Skip to contents

Main function that creates an OpenAI processor and handles the request. This maintains backward compatibility with the existing API.

This function uses the new BaseAPIProcessor architecture for improved maintainability and consistent logging across all API providers.

Usage

process_openai(prompt, model, api_key)

process_openai(prompt, model, api_key)

Arguments

prompt

Input prompt text

model

Model identifier

api_key

OpenAI API key

Value

Processed response as character vector

Processed response as character vector