SageMakerLLMContentHandler: {
    accepts: string;
    contentType: string;
    transformInput: ((prompt: string, modelKwargs: Record<string, unknown>) => Promise<Uint8Array>);
    transformOutput: ((output: Uint8Array) => Promise<string>);
}

Type declaration

  • accepts: string
  • contentType: string
  • transformInput: ((prompt: string, modelKwargs: Record<string, unknown>) => Promise<Uint8Array>)
      • (prompt, modelKwargs): Promise<Uint8Array>
      • Transforms the prompt and model arguments into a specific format for sending to SageMaker.

        Parameters

        • prompt: string

          The prompt to be transformed.

        • modelKwargs: Record<string, unknown>

          Additional arguments.

        Returns Promise<Uint8Array>

        A promise that resolves to the formatted data for sending.

  • transformOutput: ((output: Uint8Array) => Promise<string>)
      • (output): Promise<string>
      • Transforms SageMaker output into a desired format.

        Parameters

        • output: Uint8Array

          The raw output from SageMaker.

        Returns Promise<string>

        A promise that resolves to the transformed data.