WSStreamRequestHelper

io.cequence.openaiscala.service.impl.WSStreamRequestHelper
trait WSStreamRequestHelper extends WSRequestExtHelper

Stream request support specifically tailored for OpenAI API.

Attributes

Since:

Feb 2023

Graph
Supertypes
trait WSRequestExtHelper
trait WSRequestHelper
trait WSHelper
class Object
trait Matchable
class Any

Members list

Concise view

Type members

Inherited types

protected type PEP

Attributes

Inherited from:
WSRequestHelper
protected type PT

Attributes

Inherited from:
WSRequestHelper
protected type RichJsResponse = RichResponse[JsValue]

Attributes

Inherited from:
WSRequestHelper
protected type RichResponse[T] = Either[T, (Int, String)]

Attributes

Inherited from:
WSRequestHelper
protected type RichSourceResponse = RichResponse[Source[ByteString, _]]

Attributes

Inherited from:
WSRequestHelper
protected type RichStringResponse = RichResponse[String]

Attributes

Inherited from:
WSRequestHelper

Value members

Concrete methods

protected def execJsonStreamAux(endPoint: PEP, method: String, endPointParam: Option[String], params: Seq[(PT, Option[Any])], bodyParams: Seq[(PT, Option[JsValue])])(implicit materializer: Materializer): Source[JsValue, NotUsed]
protected def execStreamRequestAux[T](endPoint: PEP, method: String, endPointParam: Option[String], params: Seq[(PT, Option[Any])], bodyParams: Seq[(PT, Option[JsValue])], framing: Flow[ByteString, ByteString, NotUsed], recoverBlock: PartialFunction[Throwable, T])(implicit um: Unmarshaller[ByteString, T], materializer: Materializer): Source[T, NotUsed]

Inherited methods

def close(): Unit

Attributes

Inherited from:
WSHelper
protected def createUrl(endpoint: Option[PEP], value: Option[String]): String

Attributes

Inherited from:
WSRequestHelper
protected def execDELETE(endPoint: PEP, endPointParam: Option[String], params: Seq[(PT, Option[Any])]): Future[JsValue]

Attributes

Inherited from:
WSRequestHelper
protected def execDELETEWithStatus(endPoint: PEP, endPointParam: Option[String], params: Seq[(PT, Option[Any])], acceptableStatusCodes: Seq[Int]): Future[RichJsResponse]

Attributes

Inherited from:
WSRequestHelper
protected def execGET(endPoint: PEP, endPointParam: Option[String], params: Seq[(PT, Option[Any])]): Future[JsValue]

Attributes

Inherited from:
WSRequestHelper
protected def execGETJsonAux(request: StandaloneWSRequest, endPointForLogging: Option[PEP], acceptableStatusCodes: Seq[Int]): Future[RichJsResponse]

Attributes

Inherited from:
WSRequestHelper
protected def execGETStringAux(request: StandaloneWSRequest, endPointForLogging: Option[PEP], acceptableStatusCodes: Seq[Int]): Future[RichStringResponse]

Attributes

Inherited from:
WSRequestHelper
protected def execGETWithStatus(endPoint: PEP, endPointParam: Option[String], params: Seq[(PT, Option[Any])], acceptableStatusCodes: Seq[Int]): Future[RichJsResponse]

Attributes

Inherited from:
WSRequestHelper
protected def execPOST(endPoint: PEP, endPointParam: Option[String], params: Seq[(PT, Option[Any])], bodyParams: Seq[(PT, Option[JsValue])]): Future[JsValue]

Attributes

Inherited from:
WSRequestHelper
protected def execPOSTJsonAux[T : BodyWritable](request: StandaloneWSRequest, body: T, endPointForLogging: Option[PEP], acceptableStatusCodes: Seq[Int]): Future[RichJsResponse]

Attributes

Inherited from:
WSRequestHelper
protected def execPOSTMultipart(endPoint: PEP, endPointParam: Option[String], params: Seq[(PT, Option[Any])], fileParams: Seq[(PT, File, Option[String])], bodyParams: Seq[(PT, Option[Any])]): Future[JsValue]

Attributes

fileParams

the third param in a tuple is a display (header) file name

Inherited from:
WSRequestHelper
protected def execPOSTMultipartWithStatus(endPoint: PEP, endPointParam: Option[String], params: Seq[(PT, Option[Any])], fileParams: Seq[(PT, File, Option[String])], bodyParams: Seq[(PT, Option[Any])], acceptableStatusCodes: Seq[Int]): Future[RichJsResponse]

Attributes

fileParams

the third param in a tuple is a display (header) file name

Inherited from:
WSRequestHelper
protected def execPOSTMultipartWithStatusString(endPoint: PEP, endPointParam: Option[String], params: Seq[(PT, Option[Any])], fileParams: Seq[(PT, File, Option[String])], bodyParams: Seq[(PT, Option[Any])], acceptableStatusCodes: Seq[Int]): Future[RichStringResponse]

Attributes

fileParams

the third param in a tuple is a display (header) file name

Inherited from:
WSRequestHelper
protected def execPOSTSource(endPoint: PEP, endPointParam: Option[String], params: Seq[(PT, Option[Any])], bodyParams: Seq[(PT, Option[JsValue])]): Future[Source[ByteString, _]]

Attributes

Inherited from:
WSRequestHelper
protected def execPOSTSourceAux[T : BodyWritable](request: StandaloneWSRequest, body: T, endPointForLogging: Option[PEP], acceptableStatusCodes: Seq[Int]): Future[RichSourceResponse]

Attributes

Inherited from:
WSRequestHelper
protected def execPOSTSourceWithStatus(endPoint: PEP, endPointParam: Option[String], params: Seq[(PT, Option[Any])], bodyParams: Seq[(PT, Option[JsValue])], acceptableStatusCodes: Seq[Int]): Future[RichSourceResponse]

Attributes

Inherited from:
WSRequestHelper
protected def execPOSTStringAux[T : BodyWritable](request: StandaloneWSRequest, body: T, endPointForLogging: Option[PEP], acceptableStatusCodes: Seq[Int]): Future[RichStringResponse]

Attributes

Inherited from:
WSRequestHelper
protected def execPOSTWithStatus(endPoint: PEP, endPointParam: Option[String], params: Seq[(PT, Option[Any])], bodyParams: Seq[(PT, Option[JsValue])], acceptableStatusCodes: Seq[Int]): Future[RichJsResponse]

Attributes

Inherited from:
WSRequestHelper
override protected def getWSRequest(endPoint: Option[PEP], endPointParam: Option[String], params: Seq[(String, Any)]): Self

Attributes

Definition Classes
WSRequestExtHelper -> WSRequestHelper
Inherited from:
WSRequestExtHelper
override protected def getWSRequestOptional(endPoint: Option[PEP], endPointParam: Option[String], params: Seq[(String, Option[Any])]): Self

Attributes

Definition Classes
WSRequestExtHelper -> WSRequestHelper
Inherited from:
WSRequestExtHelper
protected def handleErrorResponse[T](response: RichResponse[T]): T

Attributes

Inherited from:
WSRequestHelper
protected def handleNotFoundAndError[T](response: RichResponse[T]): Option[T]

Attributes

Inherited from:
WSRequestHelper
protected def jsonBodyParams[T](params: (T, Option[Any])*): Seq[(T, Option[JsValue])]

Attributes

Inherited from:
WSRequestHelper
protected def paramsAsString(params: Seq[(String, Any)]): String

Attributes

Inherited from:
WSRequestHelper
protected def paramsOptionalAsString(params: Seq[(String, Option[Any])]): String

Attributes

Inherited from:
WSRequestHelper
override protected def timeouts: Timeouts

Attributes

Definition Classes
WSRequestExtHelper -> WSHelper
Inherited from:
WSRequestExtHelper
protected def toOptionalParams(params: Seq[(PT, Any)]): Seq[(PT, Some[Any])]

Attributes

Inherited from:
WSRequestHelper
protected def toStringParams(params: Seq[(PT, Option[Any])]): Seq[(String, Option[Any])]

Attributes

Inherited from:
WSRequestHelper

Inherited fields

protected val authHeaders: Seq[(String, String)]

Attributes

Inherited from:
WSRequestExtHelper
lazy protected val client: StandaloneWSClient

Attributes

Inherited from:
WSHelper
protected val coreUrl: String

Attributes

Inherited from:
WSRequestHelper
protected val defaultReadoutTimeout: Int

Attributes

Inherited from:
WSRequestExtHelper
protected val defaultRequestTimeout: Int

Attributes

Inherited from:
WSRequestExtHelper
protected val explTimeouts: Option[Timeouts]

Attributes

Inherited from:
WSRequestExtHelper
protected val extraParams: Seq[(String, String)]

Attributes

Inherited from:
WSRequestExtHelper
protected val serviceName: String

Attributes

Inherited from:
WSRequestHelper

Implicits

Inherited implicits

implicit protected val ec: ExecutionContext

Attributes

Inherited from:
WSRequestHelper
implicit protected val materializer: Materializer

Attributes

Inherited from:
WSHelper