Skip to content

Datasaur

Defines the schemas for the DatasaurLMInvoker.

DatasaurJWEConfig

Bases: BaseModel

JWE authentication configuration for Datasaur invoker.

Attributes:

Name Type Description
secret SecretStr

The shared secret for JWE token generation.

claims dict[str, Any]

The additional claims for JWE token generation. Defaults to an empty dictionary.

issuer str

The issuer of the JWE token. Defaults to "agentkit".

expires_in_seconds int

The expiration time of the JWE token in seconds. Defaults to 3600.

alg str

The algorithm of the JWE token. Defaults to "dir".

enc str

The encryption algorithm of the JWE token. Defaults to "A256GCM".

key_len int

Read-only byte length of the symmetric key derived from alg and enc.

key_len property

Byte length of the symmetric key for the configured algorithms.

Returns:

Name Type Description
int int

The byte length of the symmetric key.

infer_key_size()

Infers the key size based on the algorithm and encryption algorithm.

Returns:

Name Type Description
DatasaurJWEConfig DatasaurJWEConfig

The JWE configuration with the inferred key size.

Raises:

Type Description
ValueError

If the JWE configuration is invalid.

InputType

Defines valid input types in Datasaur.

Key

Defines valid keys in Datasaur.