connection


Description:

public async Connection connection (string usage_type, bool verify = false) throws Error

Gets a connection from validated tool config.

Gets tool config from this.config, optionally validates the specified ModelUsage, and returns the connection.

Parameters:

usage_type

The usage type: "embed" or "analysis"

verify

If true, verify the model is available before returning connection (default: false)

Returns:

The Connection for the specified usage type

Exceptions:

GLib.Error

if tool config is not properly configured