# ChatSession<T> Namespace: LLama.OldVersion #### Caution The entire LLama.OldVersion namespace will be removed --- ```csharp public class ChatSession ``` #### Type Parameters `T`
Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ChatSession<T>](./llama.oldversion.chatsession-1.md) ## Constructors ### **ChatSession(T)** ```csharp public ChatSession(T model) ``` #### Parameters `model` T
## Methods ### **Chat(String, String, String)** ```csharp public IEnumerable Chat(string text, string prompt, string encoding) ``` #### Parameters `text` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
`prompt` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
`encoding` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
#### Returns [IEnumerable<String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
### **WithPrompt(String, String)** ```csharp public ChatSession WithPrompt(string prompt, string encoding) ``` #### Parameters `prompt` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
`encoding` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
#### Returns [ChatSession<T>](./llama.oldversion.chatsession-1.md)
### **WithPromptFile(String, String)** ```csharp public ChatSession WithPromptFile(string promptFilename, string encoding) ``` #### Parameters `promptFilename` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
`encoding` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
#### Returns [ChatSession<T>](./llama.oldversion.chatsession-1.md)
### **WithAntiprompt(String[])** Set the keywords to split the return value of chat AI. ```csharp public ChatSession WithAntiprompt(String[] antiprompt) ``` #### Parameters `antiprompt` [String[]](https://docs.microsoft.com/en-us/dotnet/api/system.string)
#### Returns [ChatSession<T>](./llama.oldversion.chatsession-1.md)