models
Retrieves a list of all models from the OpenAI API.
Return
a Flow of ModelObject representing the different models provided by the API.
Example usage:
val client = OpenAIClient("<API_KEY>")
val modelsFlow = client.models()
modelsFlow.collect { model ->
println("Model ID: ${model.id}")
}
Content copied to clipboard