Class ChatGPT
OpenAI implementation of the ILLM interface.
Assembly: WMServer.dll
Syntax
public class ChatGPT : ILLM
Constructors
ChatGPT(WMLLMConnection)
Standard constructor for IEmbeddingClient interface
Declaration
public ChatGPT(WMLLMConnection asset)
Parameters
Properties
LLMConnection
The WMLLM object containing the metadata for ILLM derived classes.
Declaration
public WMLLMConnection LLMConnection { get; set; }
Property Value
Methods
CountTokens(object)
Counts and returns the number of tokens in the source object.
Declaration
public Task<int> CountTokens(object source)
Parameters
Type |
Name |
Description |
object |
source |
The source object to determine token count for.
|
Returns
GetEmbeddings(object[])
Return a list of embeddings for the input object.
Declaration
public Task<float[][]> GetEmbeddings(object[] sources)
Parameters
Type |
Name |
Description |
object[] |
sources |
The source objects to determine an embedding for.
|
Returns
Exceptions
StartConversation(WMLLM)
Start a conversation with the given parameters
Declaration
public Task<ILLMConversation> StartConversation(WMLLM llmPrompt)
Parameters
Type |
Name |
Description |
WMLLM |
llmPrompt |
|
Returns
Implements