Foundry.LlmTool

g Foundry.Contextual Foundry.Contextual Foundry.LlmTool Foundry.LlmTool Foundry.Contextual->Foundry.LlmTool GObject.GInterface GObject.GInterface Json.Serializable Json.Serializable GObject.GInterface->Json.Serializable GObject.Object GObject.Object GObject.Object->Foundry.Contextual Json.Serializable->Foundry.Contextual

Subclasses:

None

Methods

Inherited:

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

Structs:

Foundry.LlmToolClass (1), GObject.ObjectClass (5)

class

add_parameter (pspec)

call (arguments)

dup_description ()

dup_name ()

list_parameters ()

Virtual Methods

Inherited:

GObject.Object (7), Json.Serializable (5)

do_call (arguments)

do_dup_description ()

do_dup_name ()

Properties

Inherited:

Foundry.Contextual (1)

Name

Type

Flags

Short Description

description

str

r

name

str

r

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

Foundry.Contextual

r

Class Details

class Foundry.LlmTool(**kwargs)
Bases:

Foundry.Contextual

Abstract:

Yes

Structure:

Foundry.LlmToolClass

classmethod add_parameter(pspec)
Parameters:

pspec (GObject.ParamSpec) – the parameter to add

call(arguments)
Parameters:

arguments ([GObject.Value]) –

Returns:

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

Return type:

Dex.Future

Calls the tool.

arguments should be an array of initialized GValue which contain values set matching each of the parameters specified by [method`Foundry`.LlmTool.list_parameters] in the same order.

dup_description()
Return type:

str or None

Gets the “description” of a tool which may be provided to the model.

This should describe what the function does.

dup_name()
Return type:

str or None

Gets the “name” of tool which may be provided to the model.

This is often a descriptive function name like “getWeather”.

list_parameters()
Return type:

[GObject.ParamSpec] or None

Gets a list of parmaeters for the tool which must be supplied when calling [method`Foundry`.LlmTool.call].

do_call(arguments) virtual
Parameters:

arguments ([GObject.Value]) –

Returns:

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

Return type:

Dex.Future

Calls the tool.

arguments should be an array of initialized GValue which contain values set matching each of the parameters specified by [method`Foundry`.LlmTool.list_parameters] in the same order.

do_dup_description() virtual
Return type:

str or None

Gets the “description” of a tool which may be provided to the model.

This should describe what the function does.

do_dup_name() virtual
Return type:

str or None

Gets the “name” of tool which may be provided to the model.

This is often a descriptive function name like “getWeather”.

Property Details

Foundry.LlmTool.props.description
Name:

description

Type:

str

Default Value:

None

Flags:

READABLE

Foundry.LlmTool.props.name
Name:

name

Type:

str

Default Value:

None

Flags:

READABLE