Constructor Prompt
- Namespace
- LMKit.TextGeneration.Chat
- Assembly
- LM-Kit.NET.dll
Prompt(Message)
Initializes a new instance of the Prompt class using a message from the chat history.
public Prompt(ChatHistory.Message message)
Parameters
messageChatHistory.MessageThe chat history message containing the prompt text.
Exceptions
- ArgumentNullException
Thrown when
messageormessage.Content.Contentis null.
Prompt(string)
Initializes a new instance of the Prompt class with the specified text and no attachments.
public Prompt(string text)
Parameters
textstringThe textual content of the prompt.
Exceptions
- ArgumentNullException
Thrown when
textis null.
Prompt(string, Attachment)
Initializes a new instance of the Prompt class with the specified text and a single attachment.
public Prompt(string text, Attachment attachment)
Parameters
textstringThe textual content of the prompt.
attachmentAttachmentA single file attachment to include with the prompt.
Exceptions
- ArgumentNullException
Thrown when
textis null.
Prompt(string, ImageBuffer)
Initializes a new instance of the Prompt class with the specified text and image attachment.
public Prompt(string text, ImageBuffer image)
Parameters
textstringThe textual content of the prompt; cannot be
null.imageImageBufferThe ImageBuffer representing the image to include as an attachment. If
null, no attachment will be added.
Exceptions
- ArgumentNullException
Thrown when
textisnull.
Prompt(string, IEnumerable<Attachment>)
Initializes a new instance of the Prompt class with the specified text and multiple attachments.
public Prompt(string text, IEnumerable<Attachment> attachments)
Parameters
textstringThe textual content of the prompt.
attachmentsIEnumerable<Attachment>A collection of file attachments to include with the prompt.
Exceptions
- ArgumentNullException
Thrown when
textis null.