OpenAI.Responses.Types (openai_responses v0.2.1)

Type definitions and structs for the OpenAI Responses API.

This module provides functions for converting API responses into structured Elixir representations.

Summary

Functions

Creates a function call struct from API attributes.

Creates a structured message from API attributes.

Converts a response map from the API into a structured response.

Functions

function_call(attrs)

@spec function_call(map()) :: map()

Creates a function call struct from API attributes.

Parameters

  • attrs - The raw function call map from the API

Returns

  • A structured function call map

message(attrs)

@spec message(map()) :: map()

Creates a structured message from API attributes.

Parameters

  • attrs - The raw message map from the API

Returns

  • A structured message map

response(attrs)

@spec response(map()) :: map()

Converts a response map from the API into a structured response.

Parameters

  • attrs - The raw response map from the API

Returns

  • A structured response map