OpenAICompletionService

io.cequence.openaiscala.service.OpenAICompletionService

Service that offers ONLY OpenAI completion endpoint. Note that this trait is usable also for OpenAI-API-compatible services such as FastChat, Ollama, or OctoML.

Attributes

Since:

Apr 2024

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Concise view

Type members

Inherited classlikes

Attributes

Inherited from:
OpenAIServiceConsts
Graph
Supertypes
class Object
trait Matchable
class Any

Value members

Abstract methods

def createCompletion(prompt: String, settings: CreateCompletionSettings): Future[TextCompletionResponse]

Creates a completion for the provided prompt and parameters.

Creates a completion for the provided prompt and parameters.

Attributes

prompt

The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays. Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.

Returns:

text completion response

See also:

Inherited methods

def close(): Unit

Closes the underlying ws client, and releases all its resources.

Closes the underlying ws client, and releases all its resources.

Attributes

Inherited from:
CloseableService

Inherited fields

protected val configFileName: String

Attributes

Inherited from:
OpenAIServiceConsts
protected val configPrefix: String

Attributes

Inherited from:
OpenAIServiceConsts
protected val defaultCoreUrl: String

Attributes

Inherited from:
OpenAIServiceConsts