Module Chatoyant_provider.OpenaiSource

Standalone OpenAI API mirror.

The Responses API is the primary modern text surface. Chat Completions is retained as a compatibility surface for existing Chatoyant behavior and OpenAI-compatible providers. Transport is supplied through runtime effect functors so the same typed provider works from native OCaml, Melange/Node, browsers, and tests.

Sourcetype role =
  1. | Developer
  2. | System
  3. | User
  4. | Assistant
  5. | Tool
Sourcetype chat_message = {
  1. message_role : role;
  2. message_content : string option;
  3. message_name : string option;
  4. message_tool_call_id : string option;
  5. message_tool_calls : Provider.tool_call list;
}
Sourcetype function_tool = {
  1. tool_name : string;
  2. tool_description : string option;
  3. tool_parameters : Chatoyant_runtime.Json.t;
  4. tool_strict : bool option;
}
Sourcetype tool_choice =
  1. | Auto
  2. | None_
  3. | Required
  4. | Function_tool of string
  5. | Raw_tool_choice of Chatoyant_runtime.Json.t
Sourcetype chat_response_format =
  1. | Text
  2. | Json_object
  3. | Json_schema of {
    1. schema_name : string;
    2. schema_description : string option;
    3. schema_value : Chatoyant_runtime.Json.t;
    4. schema_strict : bool;
    }
Sourcetype chat_request = {
  1. chat_model : string;
  2. chat_messages : chat_message list;
  3. chat_stream : bool;
  4. chat_temperature : float option;
  5. chat_max_tokens : int option;
  6. chat_top_p : float option;
  7. chat_stop : string list;
  8. chat_user : string option;
  9. chat_seed : int option;
  10. chat_logprobs : bool option;
  11. chat_top_logprobs : int option;
  12. chat_n : int option;
  13. chat_tools : function_tool list;
  14. chat_tool_choice : tool_choice option;
  15. chat_parallel_tool_calls : bool option;
  16. chat_response_format : chat_response_format option;
  17. chat_extra : (string * Chatoyant_runtime.Json.t) list;
}

Chat Completions request body. chat_extra preserves forward compatibility for new request fields.

Sourcetype chat_response = {
  1. chat_response_id : string option;
  2. chat_response_model : string option;
  3. chat_response_content : string;
  4. chat_response_refusal : string option;
  5. chat_response_reasoning_content : string;
  6. chat_response_usage : Chatoyant_tokens.Cost.usage;
  7. chat_response_raw : Chatoyant_runtime.Json.t;
}
Sourcetype responses_input =
  1. | Input_text of string
  2. | Input_items of Chatoyant_runtime.Json.t list
Sourcetype responses_text_format =
  1. | Responses_text
  2. | Responses_json_object
  3. | Responses_json_schema of {
    1. response_schema_name : string;
    2. response_schema_description : string option;
    3. response_schema_value : Chatoyant_runtime.Json.t;
    4. response_schema_strict : bool;
    }
Sourcetype responses_request = {
  1. responses_model : string;
  2. responses_input : responses_input;
  3. responses_instructions : string option;
  4. responses_previous_response_id : string option;
  5. responses_store : bool option;
  6. responses_stream : bool;
  7. responses_temperature : float option;
  8. responses_top_p : float option;
  9. responses_max_output_tokens : int option;
  10. responses_reasoning : Chatoyant_runtime.Json.t option;
  11. responses_tools : Chatoyant_runtime.Json.t list;
  12. responses_tool_choice : tool_choice option;
  13. responses_text_format : responses_text_format option;
  14. responses_parallel_tool_calls : bool option;
  15. responses_truncation : string option;
  16. responses_metadata : (string * string) list;
  17. responses_extra : (string * Chatoyant_runtime.Json.t) list;
}

Primary Responses API request body. Tools are raw JSON because OpenAI has first-party hosted tools as well as function tools.

Sourcetype api_object = {
  1. api_object_id : string option;
  2. api_object_type : string option;
  3. api_object_raw : Chatoyant_runtime.Json.t;
}

Generic typed envelope for fast-moving OpenAI resources such as Evals, Containers, and Administration objects. Common identity fields are decoded; provider-specific fields stay losslessly available in api_object_raw.

Sourcetype api_list = {
  1. api_list_data : api_object list;
  2. api_list_first_id : string option;
  3. api_list_last_id : string option;
  4. api_list_has_more : bool;
  5. api_list_total_count : int option;
  6. api_list_raw : Chatoyant_runtime.Json.t;
}
Sourcetype api_delete = {
  1. api_delete_id : string option;
  2. api_delete_deleted : bool;
  3. api_delete_raw : Chatoyant_runtime.Json.t;
}
Sourcetype response_input_token_count = {
  1. response_input_tokens : int;
  2. response_input_token_count_raw : Chatoyant_runtime.Json.t;
}

Result from /responses/input_tokens.

Sourcetype response_status =
  1. | Completed
  2. | In_progress
  3. | Incomplete
  4. | Failed_response
  5. | Cancelled
  6. | Unknown_response_status of string
Sourcetype responses_response = {
  1. responses_id : string option;
  2. responses_model : string option;
  3. responses_status : response_status;
  4. responses_output_text : string;
  5. responses_reasoning_text : string;
  6. responses_usage : Chatoyant_tokens.Cost.usage;
  7. responses_raw : Chatoyant_runtime.Json.t;
}
Sourcetype delete_response = {
  1. deleted_id : string option;
  2. deleted : bool;
  3. deleted_raw : Chatoyant_runtime.Json.t;
}
Sourcetype api_error = {
  1. error_type : string option;
  2. error_message : string;
  3. error_code : string option;
  4. error_param : string option;
  5. error_raw : Chatoyant_runtime.Json.t option;
}
Sourcetype realtime_config = {
  1. realtime_api_key : string;
  2. realtime_model : string;
  3. realtime_base_url : string;
  4. realtime_timeout_ms : int option;
  5. realtime_headers : (string * string) list;
  6. realtime_safety_identifier : string option;
}

Server-to-server Realtime WebSocket config. realtime_base_url defaults to wss://api.openai.com/v1/realtime; the model is encoded as a query parameter.

Sourcetype realtime_client_secret_request = {
  1. realtime_client_secret_session : Chatoyant_runtime.Json.t;
  2. realtime_client_secret_extra : (string * Chatoyant_runtime.Json.t) list;
}

Realtime ephemeral-token request body for /realtime/client_secrets.

Sourcetype realtime_client_secret = {
  1. realtime_client_secret_value : string option;
  2. realtime_client_secret_expires_at : int option;
  3. realtime_client_secret_raw : Chatoyant_runtime.Json.t;
}

Ephemeral Realtime client secret returned by OpenAI.

Sourcetype realtime_call_request = {
  1. realtime_call_sdp : string;
  2. realtime_call_session : Chatoyant_runtime.Json.t;
  3. realtime_call_extra : (string * string) list;
}

WebRTC unified-interface request for /realtime/calls. The response is an SDP answer string.

Sourcetype responses_stream_event =
  1. | Response_created of responses_response
  2. | Response_in_progress of responses_response
  3. | Response_completed of responses_response
  4. | Response_failed of responses_response
  5. | Response_incomplete of responses_response
  6. | Response_output_text_delta of {
    1. item_id : string option;
    2. output_index : int option;
    3. content_index : int option;
    4. delta : string;
    }
  7. | Response_output_text_done of {
    1. item_id : string option;
    2. output_index : int option;
    3. content_index : int option;
    4. text : string;
    }
  8. | Response_reasoning_summary_text_delta of {
    1. item_id : string option;
    2. output_index : int option;
    3. summary_index : int option;
    4. delta : string;
    }
  9. | Response_function_call_arguments_delta of {
    1. item_id : string option;
    2. output_index : int option;
    3. delta : string;
    }
  10. | Response_function_call_arguments_done of {
    1. item_id : string option;
    2. output_index : int option;
    3. arguments : string;
    }
  11. | Response_refusal_delta of string
  12. | Response_error of api_error
  13. | Response_raw_event of {
    1. event_type : string option;
    2. raw : Chatoyant_runtime.Json.t;
    }
    (*

    Closed coverage for the stable Responses SSE events that carry data the SDK can safely normalize, plus Response_raw_event for newly shipped event names.

    *)
Sourcetype transcription_stream_event =
  1. | Transcription_text_delta of {
    1. transcript_delta : string;
    2. transcript_logprobs : Chatoyant_runtime.Json.t option;
    3. transcript_raw : Chatoyant_runtime.Json.t;
    }
  2. | Transcription_text_done of {
    1. transcript_text : string;
    2. transcript_logprobs : Chatoyant_runtime.Json.t option;
    3. transcript_raw : Chatoyant_runtime.Json.t;
    }
  3. | Transcription_text_segment of {
    1. transcript_segment_id : string option;
    2. transcript_segment_start : float option;
    3. transcript_segment_end : float option;
    4. transcript_segment_text : string option;
    5. transcript_segment_speaker : string option;
    6. transcript_raw : Chatoyant_runtime.Json.t;
    }
  4. | Transcription_error of api_error
  5. | Transcription_raw_event of {
    1. transcription_event_type : string option;
    2. transcription_raw : Chatoyant_runtime.Json.t;
    }
    (*

    Streaming transcript events emitted by /audio/transcriptions when stream=true, with raw fallback for newly added event variants.

    *)
Sourcetype image_response_format =
  1. | Url
  2. | Base64_json
Sourcetype image_request = {
  1. image_model : string;
  2. image_prompt : string;
  3. image_background : string option;
  4. image_moderation : string option;
  5. image_n : int option;
  6. image_output_compression : int option;
  7. image_output_format : string option;
  8. image_quality : string option;
  9. image_response_format : image_response_format option;
  10. image_size : string option;
  11. image_style : string option;
  12. image_user : string option;
  13. image_extra : (string * Chatoyant_runtime.Json.t) list;
}
Sourcetype upload_part = {
  1. upload_filename : string;
  2. upload_content_type : string option;
  3. upload_body : string;
}

In-memory upload part used by multipart endpoints. Native runtimes can map this to files or byte buffers at their HTTP effect boundary.

Sourcetype image_edit_request = {
  1. edit_model : string;
  2. edit_prompt : string;
  3. edit_images : upload_part list;
  4. edit_mask : upload_part option;
  5. edit_background : string option;
  6. edit_n : int option;
  7. edit_output_compression : int option;
  8. edit_output_format : string option;
  9. edit_quality : string option;
  10. edit_response_format : image_response_format option;
  11. edit_size : string option;
  12. edit_user : string option;
  13. edit_extra : (string * Chatoyant_runtime.Json.t) list;
}

Multipart image edit request for /images/edits. edit_extra only accepts scalar JSON values when converted to multipart form fields.

Sourcetype image_variation_request = {
  1. variation_model : string option;
  2. variation_image : upload_part;
  3. variation_n : int option;
  4. variation_response_format : image_response_format option;
  5. variation_size : string option;
  6. variation_user : string option;
  7. variation_extra : (string * Chatoyant_runtime.Json.t) list;
}

Multipart image variation request for models that expose /images/variations.

Sourcetype image_data = {
  1. image_url : string option;
  2. image_b64_json : string option;
  3. image_revised_prompt : string option;
}
Sourcetype image_response = {
  1. image_created : int option;
  2. image_data : image_data list;
  3. image_raw : Chatoyant_runtime.Json.t;
}
Sourcetype embedding_encoding_format =
  1. | Float
  2. | Base64
Sourcetype embedding_input =
  1. | Embedding_text of string
  2. | Embedding_texts of string list
  3. | Embedding_tokens of int list
Sourcetype embedding_request = {
  1. embedding_model : string;
  2. embedding_input : embedding_input;
  3. embedding_encoding_format : embedding_encoding_format option;
  4. embedding_dimensions : int option;
  5. embedding_user : string option;
  6. embedding_extra : (string * Chatoyant_runtime.Json.t) list;
}
Sourcetype embedding = {
  1. embedding_index : int option;
  2. embedding_vector : float list;
  3. embedding_raw : Chatoyant_runtime.Json.t;
}
Sourcetype embedding_response = {
  1. embedding_model : string option;
  2. embedding_data : embedding list;
  3. embedding_usage : Chatoyant_tokens.Cost.usage;
  4. embedding_raw : Chatoyant_runtime.Json.t;
}
Sourcetype model = {
  1. model_id : string option;
  2. model_object : string option;
  3. model_created : int option;
  4. model_owned_by : string option;
  5. model_raw : Chatoyant_runtime.Json.t;
}
Sourcetype model_list = {
  1. models : model list;
  2. models_raw : Chatoyant_runtime.Json.t;
}
Sourcetype file_upload = {
  1. file_filename : string;
  2. file_content_type : string option;
  3. file_body : string;
  4. file_purpose : string;
}
Sourcetype file_object = {
  1. file_id : string option;
  2. file_object : string option;
  3. file_bytes : int option;
  4. file_created_at : int option;
  5. file_filename : string option;
  6. file_purpose : string option;
  7. file_status : string option;
  8. file_raw : Chatoyant_runtime.Json.t;
}
Sourcetype file_list = {
  1. files : file_object list;
  2. first_id : string option;
  3. last_id : string option;
  4. has_more : bool;
  5. raw : Chatoyant_runtime.Json.t;
}
Sourcetype file_delete = {
  1. deleted_file_id : string option;
  2. deleted : bool;
  3. raw : Chatoyant_runtime.Json.t;
}
Sourcetype moderation_input =
  1. | Moderation_text of string
  2. | Moderation_texts of string list
Sourcetype moderation_request = {
  1. moderation_model : string option;
  2. moderation_input : moderation_input;
  3. moderation_extra : (string * Chatoyant_runtime.Json.t) list;
}
Sourcetype moderation_result = {
  1. moderation_flagged : bool;
  2. moderation_categories : Chatoyant_runtime.Json.t option;
  3. moderation_category_scores : Chatoyant_runtime.Json.t option;
  4. moderation_raw : Chatoyant_runtime.Json.t;
}
Sourcetype moderation_response = {
  1. moderation_id : string option;
  2. moderation_model : string option;
  3. moderation_results : moderation_result list;
  4. moderation_raw : Chatoyant_runtime.Json.t;
}
Sourcetype batch_status =
  1. | Validating
  2. | Failed
  3. | In_progress
  4. | Finalizing
  5. | Completed
  6. | Expired
  7. | Canceling
  8. | Canceled
  9. | Unknown_batch_status of string
Sourcetype batch_request_counts = {
  1. total : int;
  2. completed : int;
  3. failed : int;
}
Sourcetype batch_create_request = {
  1. batch_input_file_id : string;
  2. batch_endpoint : string;
  3. batch_completion_window : string;
  4. batch_metadata : (string * string) list;
  5. batch_extra : (string * Chatoyant_runtime.Json.t) list;
}
Sourcetype batch = {
  1. batch_id : string option;
  2. batch_object : string option;
  3. batch_endpoint : string option;
  4. batch_errors : Chatoyant_runtime.Json.t option;
  5. batch_input_file_id : string option;
  6. batch_completion_window : string option;
  7. batch_status : batch_status;
  8. batch_output_file_id : string option;
  9. batch_error_file_id : string option;
  10. batch_created_at : int option;
  11. batch_in_progress_at : int option;
  12. batch_expires_at : int option;
  13. batch_finalizing_at : int option;
  14. batch_completed_at : int option;
  15. batch_failed_at : int option;
  16. batch_expired_at : int option;
  17. batch_canceling_at : int option;
  18. batch_canceled_at : int option;
  19. batch_request_counts : batch_request_counts option;
  20. batch_raw : Chatoyant_runtime.Json.t;
}
Sourcetype batch_list = {
  1. batches : batch list;
  2. first_id : string option;
  3. last_id : string option;
  4. has_more : bool;
  5. raw : Chatoyant_runtime.Json.t;
}
Sourcetype audio_response_format =
  1. | Audio_json
  2. | Audio_text
  3. | Audio_srt
  4. | Audio_verbose_json
  5. | Audio_vtt
  6. | Audio_diarized_json
  7. | Audio_format of string
Sourcetype transcription_request = {
  1. transcription_file : upload_part;
  2. transcription_model : string;
  3. transcription_language : string option;
  4. transcription_prompt : string option;
  5. transcription_response_format : audio_response_format option;
  6. transcription_temperature : float option;
  7. transcription_timestamp_granularities : string list;
  8. transcription_include : string list;
  9. transcription_stream : bool option;
  10. transcription_extra : (string * Chatoyant_runtime.Json.t) list;
}
Sourcetype translation_request = {
  1. translation_file : upload_part;
  2. translation_model : string;
  3. translation_prompt : string option;
  4. translation_response_format : audio_response_format option;
  5. translation_temperature : float option;
  6. translation_extra : (string * Chatoyant_runtime.Json.t) list;
}
Sourcetype transcription = {
  1. transcription_text : string;
  2. transcription_language : string option;
  3. transcription_duration : float option;
  4. transcription_segments : Chatoyant_runtime.Json.t option;
  5. transcription_words : Chatoyant_runtime.Json.t option;
  6. transcription_raw : Chatoyant_runtime.Json.t;
}
Sourcetype speech_request = {
  1. speech_model : string;
  2. speech_input : string;
  3. speech_voice : string;
  4. speech_response_format : string option;
  5. speech_speed : float option;
  6. speech_instructions : string option;
  7. speech_extra : (string * Chatoyant_runtime.Json.t) list;
}
Sourcetype vector_store_request = {
  1. vector_store_name : string option;
  2. vector_store_file_ids : string list;
  3. vector_store_expires_after : Chatoyant_runtime.Json.t option;
  4. vector_store_metadata : (string * string) list;
  5. vector_store_extra : (string * Chatoyant_runtime.Json.t) list;
}
Sourcetype vector_store_update = {
  1. vector_store_update_name : string option;
  2. vector_store_update_expires_after : Chatoyant_runtime.Json.t option;
  3. vector_store_update_metadata : (string * string) list;
  4. vector_store_update_extra : (string * Chatoyant_runtime.Json.t) list;
}
Sourcetype vector_store_status =
  1. | Vector_expired
  2. | Vector_in_progress
  3. | Vector_completed
  4. | Vector_unknown_status of string
Sourcetype vector_store = {
  1. vector_store_id : string option;
  2. vector_store_name : string option;
  3. vector_store_status : vector_store_status;
  4. vector_store_file_counts : Chatoyant_runtime.Json.t option;
  5. vector_store_usage_bytes : int option;
  6. vector_store_created_at : int option;
  7. vector_store_raw : Chatoyant_runtime.Json.t;
}
Sourcetype vector_store_list = {
  1. vector_stores : vector_store list;
  2. vector_store_first_id : string option;
  3. vector_store_last_id : string option;
  4. vector_store_has_more : bool;
  5. vector_store_raw : Chatoyant_runtime.Json.t;
}
Sourcetype vector_store_delete = {
  1. deleted_vector_store_id : string option;
  2. deleted_vector_store : bool;
  3. deleted_vector_store_raw : Chatoyant_runtime.Json.t;
}
Sourcetype vector_store_file_request = {
  1. vector_store_file_id : string;
  2. vector_store_file_attributes : Chatoyant_runtime.Json.t option;
  3. vector_store_file_extra : (string * Chatoyant_runtime.Json.t) list;
}
Sourcetype vector_store_file = {
  1. vector_store_file_object_id : string option;
  2. vector_store_file_status : string option;
  3. vector_store_file_usage_bytes : int option;
  4. vector_store_file_created_at : int option;
  5. vector_store_file_raw : Chatoyant_runtime.Json.t;
}
Sourcetype vector_store_file_list = {
  1. vector_store_files : vector_store_file list;
  2. vector_store_files_first_id : string option;
  3. vector_store_files_last_id : string option;
  4. vector_store_files_has_more : bool;
  5. vector_store_files_raw : Chatoyant_runtime.Json.t;
}
Sourcetype vector_store_file_batch_request = {
  1. vector_store_file_batch_file_ids : string list;
  2. vector_store_file_batch_attributes : Chatoyant_runtime.Json.t option;
  3. vector_store_file_batch_chunking_strategy : Chatoyant_runtime.Json.t option;
  4. vector_store_file_batch_extra : (string * Chatoyant_runtime.Json.t) list;
}
Sourcetype vector_store_file_batch = {
  1. vector_store_file_batch_id : string option;
  2. vector_store_file_batch_status : string option;
  3. vector_store_file_batch_file_counts : Chatoyant_runtime.Json.t option;
  4. vector_store_file_batch_created_at : int option;
  5. vector_store_file_batch_raw : Chatoyant_runtime.Json.t;
}
Sourcetype vector_store_search_request = {
  1. vector_store_search_query : string;
  2. vector_store_search_max_num_results : int option;
  3. vector_store_search_rewrite_query : bool option;
  4. vector_store_search_filters : Chatoyant_runtime.Json.t option;
  5. vector_store_search_ranking_options : Chatoyant_runtime.Json.t option;
  6. vector_store_search_extra : (string * Chatoyant_runtime.Json.t) list;
}
Sourcetype vector_store_search_result = {
  1. vector_store_search_file_id : string option;
  2. vector_store_search_filename : string option;
  3. vector_store_search_score : float option;
  4. vector_store_search_content : Chatoyant_runtime.Json.t option;
  5. vector_store_search_raw : Chatoyant_runtime.Json.t;
}
Sourcetype vector_store_search_response = {
  1. vector_store_search_results : vector_store_search_result list;
  2. vector_store_search_raw : Chatoyant_runtime.Json.t;
}
Sourcetype fine_tuning_job_request = {
  1. fine_tuning_model : string;
  2. fine_tuning_training_file : string;
  3. fine_tuning_validation_file : string option;
  4. fine_tuning_suffix : string option;
  5. fine_tuning_hyperparameters : Chatoyant_runtime.Json.t option;
  6. fine_tuning_integrations : Chatoyant_runtime.Json.t list;
  7. fine_tuning_seed : int option;
  8. fine_tuning_extra : (string * Chatoyant_runtime.Json.t) list;
}
Sourcetype fine_tuning_job = {
  1. fine_tuning_id : string option;
  2. fine_tuning_model_name : string option;
  3. fine_tuning_status : string option;
  4. fine_tuning_fine_tuned_model : string option;
  5. fine_tuning_created_at : int option;
  6. fine_tuning_finished_at : int option;
  7. fine_tuning_raw : Chatoyant_runtime.Json.t;
}
Sourcetype fine_tuning_job_list = {
  1. fine_tuning_jobs : fine_tuning_job list;
  2. fine_tuning_first_id : string option;
  3. fine_tuning_last_id : string option;
  4. fine_tuning_has_more : bool;
  5. fine_tuning_raw : Chatoyant_runtime.Json.t;
}
Sourcetype fine_tuning_event = {
  1. fine_tuning_event_id : string option;
  2. fine_tuning_event_message : string option;
  3. fine_tuning_event_level : string option;
  4. fine_tuning_event_created_at : int option;
  5. fine_tuning_event_raw : Chatoyant_runtime.Json.t;
}
Sourcetype fine_tuning_event_list = {
  1. fine_tuning_events : fine_tuning_event list;
  2. fine_tuning_events_raw : Chatoyant_runtime.Json.t;
}
Sourcetype fine_tuning_checkpoint = {
  1. fine_tuning_checkpoint_id : string option;
  2. fine_tuning_checkpoint_model : string option;
  3. fine_tuning_checkpoint_step_number : int option;
  4. fine_tuning_checkpoint_metrics : Chatoyant_runtime.Json.t option;
  5. fine_tuning_checkpoint_created_at : int option;
  6. fine_tuning_checkpoint_job_id : string option;
  7. fine_tuning_checkpoint_raw : Chatoyant_runtime.Json.t;
}
Sourcetype fine_tuning_checkpoint_list = {
  1. fine_tuning_checkpoints : fine_tuning_checkpoint list;
  2. fine_tuning_checkpoints_first_id : string option;
  3. fine_tuning_checkpoints_last_id : string option;
  4. fine_tuning_checkpoints_has_more : bool;
  5. fine_tuning_checkpoints_raw : Chatoyant_runtime.Json.t;
}
Sourceval role_to_string : role -> string
Sourceval function_tool_json : function_tool -> Chatoyant_runtime.Json.t
Sourceval chat_request_json : chat_request -> Chatoyant_runtime.Json.t
Sourceval responses_request_json : responses_request -> Chatoyant_runtime.Json.t
Sourceval image_request_json : image_request -> Chatoyant_runtime.Json.t
Sourceval transcription_request_json : transcription_request -> Chatoyant_runtime.Json.t
Sourceval translation_request_json : translation_request -> Chatoyant_runtime.Json.t
Sourceval speech_request_json : speech_request -> Chatoyant_runtime.Json.t
Sourceval embedding_request_json : embedding_request -> Chatoyant_runtime.Json.t
Sourceval moderation_request_json : moderation_request -> Chatoyant_runtime.Json.t
Sourceval batch_create_request_json : batch_create_request -> Chatoyant_runtime.Json.t
Sourceval vector_store_request_json : vector_store_request -> Chatoyant_runtime.Json.t
Sourceval vector_store_update_json : vector_store_update -> Chatoyant_runtime.Json.t
Sourceval vector_store_file_request_json : vector_store_file_request -> Chatoyant_runtime.Json.t
Sourceval vector_store_file_batch_request_json : vector_store_file_batch_request -> Chatoyant_runtime.Json.t
Sourceval vector_store_search_request_json : vector_store_search_request -> Chatoyant_runtime.Json.t
Sourceval fine_tuning_job_request_json : fine_tuning_job_request -> Chatoyant_runtime.Json.t
Sourceval realtime_client_secret_request_json : realtime_client_secret_request -> Chatoyant_runtime.Json.t
Sourceval authorization_headers : api_key:string -> (string * string) list
Sourceval realtime_url : ?base_url:string -> model:string -> unit -> string
Sourceval chat_response_of_json : Chatoyant_runtime.Json.t -> chat_response
Sourceval generation_of_chat_response : chat_response -> Provider.generation
Sourceval responses_response_of_json : Chatoyant_runtime.Json.t -> responses_response
Sourceval generation_of_responses_response : responses_response -> Provider.generation
Sourceval responses_stream_event_of_json : Chatoyant_runtime.Json.t -> responses_stream_event
Sourceval responses_stream_events_of_chunks : string list -> (responses_stream_event list, string) result
Sourceval response_of_stream_chunks : string list -> (responses_response, string) result
Sourceval chat_response_of_stream_chunks : string list -> (chat_response, string) result
Sourceval api_object_of_json : Chatoyant_runtime.Json.t -> api_object
Sourceval api_list_of_json : Chatoyant_runtime.Json.t -> api_list
Sourceval api_delete_of_json : Chatoyant_runtime.Json.t -> api_delete
Sourceval response_input_token_count_of_json : Chatoyant_runtime.Json.t -> response_input_token_count
Sourceval transcription_stream_event_of_json : Chatoyant_runtime.Json.t -> transcription_stream_event
Sourceval transcription_stream_events_of_chunks : string list -> (transcription_stream_event list, string) result
Sourceval delete_response_of_json : Chatoyant_runtime.Json.t -> delete_response
Sourceval api_error_of_json : Chatoyant_runtime.Json.t -> api_error
Sourceval image_response_of_json : Chatoyant_runtime.Json.t -> image_response
Sourceval embedding_response_of_json : Chatoyant_runtime.Json.t -> embedding_response
Sourceval model_list_of_json : Chatoyant_runtime.Json.t -> model_list
Sourceval model_of_json : Chatoyant_runtime.Json.t -> model
Sourceval file_object_of_json : Chatoyant_runtime.Json.t -> file_object
Sourceval file_list_of_json : Chatoyant_runtime.Json.t -> file_list
Sourceval file_delete_of_json : Chatoyant_runtime.Json.t -> file_delete
Sourceval moderation_response_of_json : Chatoyant_runtime.Json.t -> moderation_response
Sourceval batch_of_json : Chatoyant_runtime.Json.t -> batch
Sourceval batch_list_of_json : Chatoyant_runtime.Json.t -> batch_list
Sourceval realtime_client_secret_of_json : Chatoyant_runtime.Json.t -> realtime_client_secret
Sourceval transcription_of_json : Chatoyant_runtime.Json.t -> transcription
Sourceval vector_store_of_json : Chatoyant_runtime.Json.t -> vector_store
Sourceval vector_store_list_of_json : Chatoyant_runtime.Json.t -> vector_store_list
Sourceval vector_store_delete_of_json : Chatoyant_runtime.Json.t -> vector_store_delete
Sourceval vector_store_file_of_json : Chatoyant_runtime.Json.t -> vector_store_file
Sourceval vector_store_file_list_of_json : Chatoyant_runtime.Json.t -> vector_store_file_list
Sourceval vector_store_file_batch_of_json : Chatoyant_runtime.Json.t -> vector_store_file_batch
Sourceval vector_store_search_response_of_json : Chatoyant_runtime.Json.t -> vector_store_search_response
Sourceval fine_tuning_job_of_json : Chatoyant_runtime.Json.t -> fine_tuning_job
Sourceval fine_tuning_job_list_of_json : Chatoyant_runtime.Json.t -> fine_tuning_job_list
Sourceval fine_tuning_event_list_of_json : Chatoyant_runtime.Json.t -> fine_tuning_event_list
Sourceval fine_tuning_checkpoint_list_of_json : Chatoyant_runtime.Json.t -> fine_tuning_checkpoint_list

OpenAI Realtime WebSocket helper. Events stay provider JSON because the Realtime API evolves quickly; callers can still use typed JSON-schema codecs on top.