OpenAIEndpointDallE
Wisej.AI.Endpoints.OpenAIEndpointDallE
Namespace: Wisej.AI.Endpoints
Assembly: Wisej.AI (3.5.0.0)
Represents an endpoint for connecting to OpenAI DallE services.
public class OpenAIEndpointDallE : SmartHttpEndpoint
This class is used to interact with the OpenAI DallE API for generating images. It sets up the necessary authentication and model parameters required for the API requests.
Constructors
OpenAIEndpointDallE()

Initializes a new instance of the OpenAIEndpointDallE class.
Sets default values for authentication, model, and URL specific to the DallE API.
Properties
Model

String: Gets or sets the model used for the DallE API. (Default: "dall-e-3"
)
URL

String: Gets or sets the URL for the DallE API endpoint. (Default: "https://api.openai.com/v1/images/generations"
)
Methods
AddMessages(payload, session, messages)

Adds user messages to the payload for the API request.
Throws:
ArgumentNullException Thrown when any of the parameters are null.
ReadAssistantMessage(response, message)

Reads the assistant's message from the API response.
Parses the response to extract image URLs or base64 encoded images and assigns them to the message.Throws:
ArgumentNullException Thrown when any of the parameters are null.
ReadUsage(message, reply)

Reads the usage information from the API response.
This method does not process usage information as it is not returned by the API.
Last updated