OpenAIChatCompletionService

io.cequence.openaiscala.service.OpenAIChatCompletionService
trait OpenAIChatCompletionService extends OpenAIServiceConsts with CloseableService

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

Attributes

Since:

March 2024

Graph
Supertypes
trait CloseableService
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

Creates a model response for the given chat conversation.

Creates a model response for the given chat conversation.

Attributes

messages

A list of messages comprising the conversation so far.

Returns:

chat 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