GroqCloudEndpointWhisper
Wisej.AI.Endpoints.GroqCloudEndpointWhisper
Last updated
Wisej.AI.Endpoints.GroqCloudEndpointWhisper
Last updated
Namespace: Wisej.AI.Endpoints
Assembly: Wisej.AI (3.5.0.0)
Represents a connection to GroqCloud speech endpoints for audio transcription.
This class is used to interact with the GroqCloud API for converting audio inputs into text transcriptions using the Whisper model.
Initializes a new instance of the class with default settings.
Sets the default authentication method, model, response format, and API URL.
Adds user messages to the payload for the API request.
payload
The payload to be sent to the API.
session
The current session containing user data.
messages
The list of messages to be processed.
This method extracts the last user message and adds its binary and text content to the payload.
Creates the HTTP content for the request.
data
The data to be included in the request.
This method constructs a multipart form data content from the provided data, supporting both binary and string content.
Reads the assistant's message from the API response.
response
The response received from the API.
message
The message object to populate with the response data.
This method parses the response content and updates the message text accordingly.
Reads the usage information from the API reply.
message
The message object to update with usage data.
reply
The reply data from the API.
This functionality is not supported in the current implementation.
: Gets or sets the model used for audio transcription. (Default: "whisper-large-v3"
)
: Gets or sets the URL for the GroqCloud API endpoint. (Default: "https://api.groq.com/openai/v1/audio/transcriptions"
)
Returns: . A object containing the request data.