Interface ILLM
An interface implemented by all LLM provider classes.
Namespace: Quantellia.WMServer.Asset.LLM
Assembly: WMServer.dll
Syntax
public interface ILLM
Properties
LLMConnection
The WMLLMConnection object containing the metadata for ILLM derived classes.
Declaration
WMLLMConnection LLMConnection { get; set; }
Property Value
Type | Description |
---|---|
WMLLMConnection |
Methods
CountTokens(object)
Counts and returns the number of tokens in the source object.
Declaration
Task<int> CountTokens(object source)
Parameters
Type | Name | Description |
---|---|---|
object | source | The source object to determine token count for. |
Returns
Type | Description |
---|---|
Task<int> |
GetEmbeddings(object[])
Converts the source objects into an array of vectors (embeddings).
Declaration
Task<float[][]> GetEmbeddings(object[] sources)
Parameters
Type | Name | Description |
---|---|---|
object[] | sources | The source objects to determine an embedding for. |
Returns
Type | Description |
---|---|
Task<float[][]> |
Exceptions
Type | Condition |
---|---|
NotImplementedException |
StartConversation(WMLLM)
Will create an ILLMConversation derived type specific to the derived type this method is called on. Populates all necessary properties on the ILLMConversation and returns it.
Declaration
Task<ILLMConversation> StartConversation(WMLLM llmPrompt)
Parameters
Type | Name | Description |
---|---|---|
WMLLM | llmPrompt | The individual prompt to call. |
Returns
Type | Description |
---|---|
Task<ILLMConversation> |