LocalAIEndpointWhisper
Wisej.AI.Endpoints.LocalAIEndpointWhisper
Last updated
Wisej.AI.Endpoints.LocalAIEndpointWhisper
Last updated
Namespace: Wisej.AI.Endpoints
Assembly: Wisej.AI (3.5.0.0)
Represents an endpoint for connecting to LocalAI's Whisper model for speech-to-text transcriptions.
This class is designed to interact with LocalAI's Whisper model, providing functionality to send audio data and receive transcriptions. It extends the to leverage HTTP communication.
Initializes a new instance of the class with default settings.
Sets the authentication method to "Bearer", the model to "whisper-1", and the response format to "text". The URL is set to LocalAI's audio transcription endpoint.
Adds user messages to the payload for the request.
payload
The payload to which messages will be added.
session
The current session containing user data.
messages
The list of messages to be processed.
Throws:
Creates the HTTP content for the request using the provided data.
data
The data to be included in the request content.
Reads the assistant's message from the response and updates the message object.
response
The response received from the server.
message
The message object to be updated with the assistant's reply.
Throws:
Reads the usage information from the reply. Not supported in this implementation.
message
The message object to be updated with usage information.
reply
The reply containing usage data.
: Gets or sets the model used for transcription. (Default: "whisper-1"
)
: Gets or sets the URL for the LocalAI audio transcription endpoint. (Default: "http://localhost:8080/v1/audio/transcriptions"
)
Thrown if any of the parameters are null.
Returns: . A object containing the request data.
Thrown if any of the parameters are null.