transcriptions#

async PDPrefillServer.transcriptions(request: TranscriptionRequest, raw_request_info: RawRequestInfo | None = None) AsyncGenerator[List[str | ErrorResponse] | TranscriptionResponse, None]#

Runs an transcriptions request to the engine and returns the response.

Returns an AsyncGenerator over the TranscriptionResponse object. This is so that the caller can have a consistent interface across all the methods of chat, completions, embeddings and transcriptions.

Parameters:
  • request (TranscriptionRequest) – A TranscriptionRequest object.

  • raw_request_info (RawRequestInfo | None) – Optional RawRequestInfo containing data from the original HTTP request.

Returns:

An AsyncGenerator over the TranscriptionResponse object.

Return type:

AsyncGenerator[List[str | ErrorResponse] | TranscriptionResponse, None]