Foundry.LlmManager

g Foundry.Contextual Foundry.Contextual Foundry.Service Foundry.Service Foundry.Contextual->Foundry.Service Foundry.LlmManager Foundry.LlmManager Foundry.Service->Foundry.LlmManager GObject.GInterface GObject.GInterface Gio.ListModel Gio.ListModel GObject.GInterface->Gio.ListModel Json.Serializable Json.Serializable GObject.GInterface->Json.Serializable GObject.Object GObject.Object GObject.Object->Foundry.Contextual Gio.ListModel->Foundry.LlmManager Json.Serializable->Foundry.Contextual

Subclasses:

None

Methods

Inherited:

Foundry.Service (8), Foundry.Contextual (4), GObject.Object (37), Json.Serializable (8), Gio.ListModel (4)

Structs:

Foundry.ServiceClass (3), GObject.ObjectClass (5)

find_model (name)

find_resource (uri)

list_models ()

list_resources ()

list_tools ()

Virtual Methods

Inherited:

GObject.Object (7), Json.Serializable (5), Gio.ListModel (3)

Properties

Inherited:

Foundry.Contextual (1)

Signals

Inherited:

GObject.Object (1), Gio.ListModel (1)

Fields

Inherited:

GObject.Object (1), Gio.ListModel (1)

Class Details

class Foundry.LlmManager(**kwargs)
Bases:

Foundry.Service, Gio.ListModel

Abstract:

No

Structure:

Foundry.LlmManagerClass

find_model(name)
Parameters:

name (str) – the name of the model

Returns:

a [class`Dex`.Future] that resolves to a [class`Foundry`.LlmModel] or rejects with error.

Return type:

Dex.Future

Finds the first model which matches name.

find_resource(uri)
Parameters:

uri (str) – the URI of the resource

Returns:

a [class`Dex`.Future] that resolves to a [class`Foundry`.LlmResource] or rejects with error.

Return type:

Dex.Future

Finds the first resource which matches uri.

New in version 1.1.

list_models()
Returns:

a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.LlmModel].

Return type:

Dex.Future

List models from all providers.

The resulting [iface`Gio`.ListModel] is asynchronously populated. If you want to be sure that all providers have completed populating, you may await completion by calling [func`Foundry`.list_model_await].

list_resources()
Returns:

a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.LlmResource].

Return type:

Dex.Future

List resources from all providers.

The resulting [iface`Gio`.ListModel] is asynchronously populated. If you want to be sure that all providers have completed populating, you may await completion by calling [func`Foundry`.list_model_await].

New in version 1.1.

list_tools()
Returns:

a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.LlmTool].

Return type:

Dex.Future

The resulting [iface`Gio`.ListModel] is asynchronously populated. If you want to be sure that all providers have completed populating, you may await completion by calling [func`Foundry`.list_model_await].