WatsonXClient

org.llm4s.llmconnect.provider.WatsonXClient
See theWatsonXClient companion class
object WatsonXClient

Attributes

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

Members list

Value members

Concrete methods

Constructs a WatsonXClient, wrapping any construction-time exception in a Left.

Constructs a WatsonXClient, wrapping any construction-time exception in a Left.

Value parameters

config

model, credentials, project or space and endpoints.

exchangeLogging

optional provider exchange logging.

metrics

receives per-call latency and token-usage events.

Attributes

Concrete fields

val DefaultRequestTimeout: FiniteDuration

The timeout of a non-streaming call when the section sets no timeouts.request: two minutes.

The timeout of a non-streaming call when the section sets no timeouts.request: two minutes.

Attributes

val DefaultStreamTimeout: FiniteDuration

The timeout of a streamed call when the section sets no timeouts.stream: ten minutes.

The timeout of a streamed call when the section sets no timeouts.stream: ten minutes.

Attributes

val ErrorFinishReasons: Set[String]

The finish_reason values that mean a generation did not finish: error, cancelled and time_limit. The chat API's values are stop, length, tool_calls, time_limit, cancelled, error, and null while a response is incomplete (SDK-evidenced: NODE types/vml_v1.ts:3319-3330, 3362-3369). Calling the last three failures is this client's policy: the SDK notes that on time_limit the text generated so far is returned, which this client does not report as a success. Compared after normalizeFinishReason, so any case matches. Anything else is a normal stop: stop, length, tool_calls and any value IBM adds later.

The finish_reason values that mean a generation did not finish: error, cancelled and time_limit. The chat API's values are stop, length, tool_calls, time_limit, cancelled, error, and null while a response is incomplete (SDK-evidenced: NODE types/vml_v1.ts:3319-3330, 3362-3369). Calling the last three failures is this client's policy: the SDK notes that on time_limit the text generated so far is returned, which this client does not report as a success. Compared after normalizeFinishReason, so any case matches. Anything else is a normal stop: stop, length, tool_calls and any value IBM adds later.

Attributes