Skip to main content
Version: Next

OpenAIVisionHelper

Functions

prompt()

prompt(prompt: Test; parameters : OpenAIChatCompletionsParameters)

ParameterTypeDescription
promptTextThe text prompt to send to the OpenAI chat API.
parametersOpenAIChatCompletionsParametersOptional parameters for the chat completion request.
Function resultOpenAIChatCompletionsResultThe result of the vision.

Sends a prompt to the OpenAI chat API along with an associated image URL, and optionally accepts parameters for the chat completion.

Example Usage

var $helper:=$client.chat.vision.create("http://example.com/image.jpg")

var $result:=$helper.prompt("Could you describe?")

$result:=$helper.prompt("Have any red element?"; {model: "gpt-4o-mini"; max_completion_tokens: 100 })