Show / Hide Table of Contents

Class WMLLMDTO

the DTO for the WMLLM class. Contains all of the data and metadata needed to start a LLM conversation with a provider.

Inheritance
object
DataTransferObject<WMLLM>
WMAssetBaseDTO<WMLLM>
WMLLMDTO
Implements
IWMAssetBaseDTO
IWMVersionableAsset
IWMOwnableResource
IWMResource
IDbEntity
IWMEntity
IHasEncryptedValues
Inherited Members
WMAssetBaseDTO<WMLLM>.ID
WMAssetBaseDTO<WMLLM>.Name
WMAssetBaseDTO<WMLLM>.OwnerID
WMAssetBaseDTO<WMLLM>.OwnerType
WMAssetBaseDTO<WMLLM>.ParentID
WMAssetBaseDTO<WMLLM>.FullPathName
WMAssetBaseDTO<WMLLM>.CreatedBy
WMAssetBaseDTO<WMLLM>.CreatedDate
WMAssetBaseDTO<WMLLM>.LastUpdatedBy
WMAssetBaseDTO<WMLLM>.LastUpdatedDate
WMAssetBaseDTO<WMLLM>.Summary
WMAssetBaseDTO<WMLLM>.Documentation
WMAssetBaseDTO<WMLLM>.DocumentationMIMEType
WMAssetBaseDTO<WMLLM>.Properties
WMAssetBaseDTO<WMLLM>.Version
WMAssetBaseDTO<WMLLM>.VersionName
WMAssetBaseDTO<WMLLM>.Status
WMAssetBaseDTO<WMLLM>.IsDeleted
WMAssetBaseDTO<WMLLM>.PropertiesSerialized
WMAssetBaseDTO<WMLLM>.UpdateDTO<A, B>(WMPrincipal, WMAssetIdentifier, A, DbSet<A>, WMAppDbContext, Func<A, Task>)
WMAssetBaseDTO<WMLLM>.CreateDTO<A, B>(WMPrincipal, A, DbSet<A>, WMAppDbContext, Func<A, Task>)
WMAssetBaseDTO<WMLLM>.DeleteDTO<A, B>(WMPrincipal, WMAssetIdentifier, DbSet<A>, WMAppDbContext, Func<A, Task>)
WMAssetBaseDTO<WMLLM>.ValidateDirectory<T_Asset>(WMPrincipal, WMAssetBaseDTO<T_Asset>, WMAssetBaseDTO<T_Asset>, WMAppDbContext)
WMAssetBaseDTO<WMLLM>.CloneDTO<A, B>(WMPrincipal, WMAssetIdentifier, DbSet<A>, VersionCreateArgs, WMAppDbContext, Func<A, Task>)
WMAssetBaseDTO<WMLLM>.CommitDTO<A, B>(WMPrincipal, WMAssetIdentifier, DbSet<A>, WMAppDbContext)
WMAssetBaseDTO<WMLLM>.DTOVersions<A, B>(WMPrincipal, WMAssetIdentifier, DbSet<A>, WMAppDbContext)
WMAssetBaseDTO<WMLLM>.GetDTO<A>(WMPrincipal, WMAssetIdentifier, IQueryable<A>, WMAppDbContext, Expression<Func<A, A>>)
WMAssetBaseDTO<WMLLM>.GetDTOFromDirectory<A>(WMPrincipal, WMAssetIdentifier, int, DbSet<A>, WMAppDbContext, Expression<Func<A, A>>)
WMAssetBaseDTO<WMLLM>.GetAuthorizedAssetIQueryable<A>(WMPrincipal, IQueryable<A>, WMAppDbContext)
WMAssetBaseDTO<WMLLM>.GetEveryAuthorizedAssetIQueryable(WMPrincipal, WMAppDbContext)
WMAssetBaseDTO<WMLLM>.GetIdentifier(bool)
DataTransferObject<WMLLM>.ModelObject
DataTransferObject<WMLLM>.SetID(string)
DataTransferObject<WMLLM>.CreateModel(WMPrincipal, DbContext, object[])
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Quantellia.WMServer.Asset.LLM
Assembly: WMServer.dll
Syntax
[PrimaryKey("ID", new string[] { "Version" })]
public class WMLLMDTO : WMAssetBaseDTO<WMLLM>, IWMAssetBaseDTO, IWMVersionableAsset, IWMOwnableResource, IWMResource, IDbEntity, IWMEntity, IHasEncryptedValues

Constructors

WMLLMDTO()

Constructor for WMLLMDTO

Declaration
public WMLLMDTO()

WMLLMDTO(string)

Constructor for WMLLMDTO, with specified ID

Declaration
public WMLLMDTO(string ID)
Parameters
Type Name Description
string ID

Properties

EncryptionPlaceholder

Standard string to replace encrypted values with when not returning plain-text values.

Declaration
[NotMapped]
public string EncryptionPlaceholder { get; set; }
Property Value
Type Description
string

LLMConnection

The WMLLMConnection identifier that this prompt invokes.

Declaration
public string LLMConnection { get; set; }
Property Value
Type Description
string

Prompt

The system prompt determining the behavior of this LLM.

Declaration
public string Prompt { get; set; }
Property Value
Type Description
string

Temperature

The temperature parameter of the model.

Declaration
public float? Temperature { get; set; }
Property Value
Type Description
float?

Tools

The Tools used by the model. Note, Tools refers to a method with a description made available to the model. If a Tool "GetTimeZone()" has description "Returns the timezone of the user" and the LLM determines that it needs the user's timezone to answer a question, it will request the execution of "GetTimeZone()", and format its answer based on the return value.

Declaration
public string? Tools { get; set; }
Property Value
Type Description
string

Methods

Clone(WMPrincipal, WMAssetIdentifier, VersionCreateArgs?, WMAppDbContext)

Clones the specified asset with an iterated name "AssetName (1), etc... ", iterates the version number.

Declaration
public static Task<WMLLMDTO> Clone(WMPrincipal principal, WMAssetIdentifier identifier, VersionCreateArgs? args, WMAppDbContext context)
Parameters
Type Name Description
WMPrincipal principal

The owner of the directory

WMAssetIdentifier identifier

The identifier of the directory

VersionCreateArgs args

Arguments for creating a version.

WMAppDbContext context

The DbContext

Returns
Type Description
Task<WMLLMDTO>
Exceptions
Type Condition
Exception

Commit(WMPrincipal, WMAssetIdentifier, WMAppDbContext)

Commits the specified asset as Head.

Declaration
public static Task Commit(WMPrincipal principal, WMAssetIdentifier identifier, WMAppDbContext context)
Parameters
Type Name Description
WMPrincipal principal

The owner of the directory

WMAssetIdentifier identifier

The identifier of the directory

WMAppDbContext context

The DbContext

Returns
Type Description
Task
Exceptions
Type Condition
Exception

Create(WMPrincipal, WMLLMDTO, WMAppDbContext)

Create a new WMLLMDTO from the provided data.

Declaration
public static Task<WMLLM> Create(WMPrincipal principal, WMLLMDTO a_dto, WMAppDbContext context)
Parameters
Type Name Description
WMPrincipal principal

The owner of the data reader

WMLLMDTO a_dto

The WMLLMDTO to be created.

WMAppDbContext context

The DbContext

Returns
Type Description
Task<WMLLM>
Exceptions
Type Condition
Exception

Delete(WMPrincipal, WMAssetIdentifier, WMAppDbContext)

Delete the WMLLMDTO with the corresponding ID or FullPathName

Declaration
public static Task Delete(WMPrincipal principal, WMAssetIdentifier identifier, WMAppDbContext context)
Parameters
Type Name Description
WMPrincipal principal

The owner of the directory

WMAssetIdentifier identifier

The identifier of the asset

WMAppDbContext context

The DbContext

Returns
Type Description
Task
Exceptions
Type Condition
Exception

FromModel()

Create this instance by reading properties from a WMLLM

Declaration
public override void FromModel()
Overrides
DataTransferObject<WMLLM>.FromModel()

Get(WMPrincipal, WMAssetIdentifier, WMAppDbContext?, Expression<Func<WMLLMDTO, WMLLMDTO>>)

Gets the WMLLMDTO instance with the specified id. Ensures ownership.

Declaration
public static Task<WMLLMDTO> Get(WMPrincipal principal, WMAssetIdentifier identifier, WMAppDbContext? context = null, Expression<Func<WMLLMDTO, WMLLMDTO>> propertySelector = null)
Parameters
Type Name Description
WMPrincipal principal
WMAssetIdentifier identifier

The identifier of the asset

WMAppDbContext context
Expression<Func<WMLLMDTO, WMLLMDTO>> propertySelector

An optional expression that allows additional mapping of the database DTO object to the instance DTO object. (i.e. excluding DocumentData and DocumentEditedText from WMDocumentDTO, which requires excessive time and bandwidth. An example of this can be found in Get(WMPrincipal, WMAssetIdentifier, WMAppDbContext?, Expression<Func<WMDocumentDTO, WMDocumentDTO>>))

Returns
Type Description
Task<WMLLMDTO>

GetAssociatedVectorDBs(WMPrincipal, WMAssetIdentifier, WMAppDbContext)

Get this LLM's associated VectorDBs

Declaration
public static Task<IEnumerable<WMDocumentIndexDTO>> GetAssociatedVectorDBs(WMPrincipal principal, WMAssetIdentifier identifier, WMAppDbContext context)
Parameters
Type Name Description
WMPrincipal principal
WMAssetIdentifier identifier

The identifier of the asset

WMAppDbContext context
Returns
Type Description
Task<IEnumerable<WMDocumentIndexDTO>>

GetFromDirectory(WMPrincipal, WMAssetIdentifier, int, WMAppDbContext, Expression<Func<WMLLMDTO, WMLLMDTO>>)

Gets a listing of the specified WMLLMDTO to the recursion depth specified with the ID/Dir of a WMAssetDirectory as input.

Declaration
public static Task<IEnumerable<WMLLMDTO>> GetFromDirectory(WMPrincipal principal, WMAssetIdentifier identifier = null, int recursionDepth = 0, WMAppDbContext context = null, Expression<Func<WMLLMDTO, WMLLMDTO>> propertySelector = null)
Parameters
Type Name Description
WMPrincipal principal

The owner of the data readers being requested.

WMAssetIdentifier identifier

The identifier of the asset

int recursionDepth

Depth to which the directory subtrees under the specified directory should be traversed.

WMAppDbContext context

Optional reference to a WMAppDbContext instance.

Expression<Func<WMLLMDTO, WMLLMDTO>> propertySelector

An optional expression that allows additional mapping of the database DTO object to the instance DTO object. (i.e. excluding DocumentData and DocumentEditedText from WMDocumentDTO, which requires excessive time and bandwidth. An example of this can be found in Get(WMPrincipal, WMAssetIdentifier, WMAppDbContext?, Expression<Func<WMDocumentDTO, WMDocumentDTO>>))

Returns
Type Description
Task<IEnumerable<WMLLMDTO>>

ResourceDefinition()

The resource operation definition for this asset.

Declaration
public static WMResourceOperationsDefinition ResourceDefinition()
Returns
Type Description
WMResourceOperationsDefinition

Update(WMPrincipal, WMAssetIdentifier, WMLLMDTO, WMAppDbContext)

Updates the specified WMLLMDTO from the provided data.

Declaration
public static Task Update(WMPrincipal principal, WMAssetIdentifier identifier, WMLLMDTO a_dto, WMAppDbContext context)
Parameters
Type Name Description
WMPrincipal principal

The owner of the directory

WMAssetIdentifier identifier

The identifier of the asset

WMLLMDTO a_dto

The WMLLMDTO to be updated.

WMAppDbContext context

The DbContext

Returns
Type Description
Task
Exceptions
Type Condition
Exception

UpdateModel(WMPrincipal, DbContext, object[]?)

Updates and returns the contained WMLLM.

Declaration
public override Task<WMLLM> UpdateModel(WMPrincipal principal, DbContext context, object[]? data = null)
Parameters
Type Name Description
WMPrincipal principal
DbContext context
object[] data
Returns
Type Description
Task<WMLLM>
Overrides
WMAssetBaseDTO<WMLLM>.UpdateModel(WMPrincipal, DbContext, object[])

Versions(WMPrincipal, WMAssetIdentifier, WMAppDbContext)

Gets all versions of the specified asset.

Declaration
public static Task<IEnumerable<VersionArgs>> Versions(WMPrincipal principal, WMAssetIdentifier identifier, WMAppDbContext context)
Parameters
Type Name Description
WMPrincipal principal

The owner of the directory

WMAssetIdentifier identifier

The identifier of the directory

WMAppDbContext context

The DbContext

Returns
Type Description
Task<IEnumerable<VersionArgs>>
Exceptions
Type Condition
Exception

Implements

IWMAssetBaseDTO
IWMVersionableAsset
IWMOwnableResource
IWMResource
IDbEntity
IWMEntity
IHasEncryptedValues
In this article
Back to top Copyright © 2025 Quantellia LLC.    Version 2.0.0 Revision 399     Last Updated 1/15/2025    DRAFT DOCUMENTATION. SUBJECT TO CHANGE