OpenAIRequestBody

org.llm4s.imageprocessing.provider.OpenAIRequestBody

Attributes

Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def serialize(model: String, maxTokens: Int, prompt: String, base64Image: String, mediaType: MediaType): String

Creates a request body for OpenAI Vision API calls with a single image and prompt.

Creates a request body for OpenAI Vision API calls with a single image and prompt.

Value parameters

base64Image

The base64-encoded image data

maxTokens

Maximum tokens in the response

mediaType

The media type of the image

model

The OpenAI model to use (e.g., "gpt-4-vision-preview")

prompt

The text prompt for image analysis

Attributes

Returns

Serialized JSON string for the API request

Implicits

Implicits

implicit val rw: ReadWriter[OpenAIRequestBody]