OpenAIClient

dev.maxmelnyk.openaiscala.client.OpenAIClient$
See theOpenAIClient companion trait

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Value members

Concrete methods

def apply[F[_]](apiKey: String, orgIdOpt: Option[String])(sttpBackend: SttpBackend[F, Any])(implicit monadError: MonadError[F, Throwable]): OpenAIClient[F]

Creates a default instance of OpenAIClient.

Creates a default instance of OpenAIClient.

Attributes

F

generic monad type to wrap results into (ie IO, Future etc).

apiKey

OpenAI API key.

monadError

monad error instance, so we know how to operate with provided monad type.

orgIdOpt

OpenAI organization ID.

sttpBackend

sttp backend to use for requests.

Returns:

an instance of OpenAIClient.

def apply[F[_]](sttpBackend: SttpBackend[F, Any])(implicit monadError: MonadError[F, Throwable]): OpenAIClient[F]

Creates a default instance of OpenAIClient using config values for api key and org id.

Creates a default instance of OpenAIClient using config values for api key and org id.

Attributes

F

generic monad type to wrap results into (ie IO, Future etc).

monadError

monad error instance, so we know how to operate with provided monad type.

sttpBackend

sttp backend to use for requests.

Returns:

an instance of OpenAIClient.