Action

OpenAI: List Models

Posted by agiletortoise, Last update 8 months ago

List available models for the API key.

For more information on using this action, visit our OpenAI integration guide

Steps

  • script

    // create OpenAI object
    let ai = new OpenAI()
    
    // make API request
    let response = ai.request({
    	"path": "/models",
    	"method": "GET",
    	"data": null
    })
    
    // report status
    if (response.success) {
    	alert(`AVAILABLE MODELS:
    
    ${response.responseData.data.map(m => m.id).join("\n")}
    `)
    }
    console.log(`CODE: ${response.statusCode}
    
    ERR: ${response.error}
    
    ${response.responseText}
    `)

Options

  • After Success Default
    Notification Info
    Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.