You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

llama.chatsession-1.md 1.6 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # ChatSession<T>
  2. Namespace: LLama
  3. ```csharp
  4. public class ChatSession<T>
  5. ```
  6. #### Type Parameters
  7. `T`<br>
  8. Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ChatSession&lt;T&gt;](./llama.chatsession-1.md)
  9. ## Constructors
  10. ### **ChatSession(T)**
  11. ```csharp
  12. public ChatSession(T model)
  13. ```
  14. #### Parameters
  15. `model` T<br>
  16. ## Methods
  17. ### **Chat(String, String)**
  18. ```csharp
  19. public IEnumerable<string> Chat(string text, string prompt)
  20. ```
  21. #### Parameters
  22. `text` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  23. `prompt` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  24. #### Returns
  25. [IEnumerable&lt;String&gt;](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)<br>
  26. ### **WithPrompt(String)**
  27. ```csharp
  28. public ChatSession<T> WithPrompt(string prompt)
  29. ```
  30. #### Parameters
  31. `prompt` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  32. #### Returns
  33. [ChatSession&lt;T&gt;](./llama.chatsession-1.md)<br>
  34. ### **WithPromptFile(String)**
  35. ```csharp
  36. public ChatSession<T> WithPromptFile(string promptFilename)
  37. ```
  38. #### Parameters
  39. `promptFilename` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  40. #### Returns
  41. [ChatSession&lt;T&gt;](./llama.chatsession-1.md)<br>
  42. ### **WithAntiprompt(String[])**
  43. ```csharp
  44. public ChatSession<T> WithAntiprompt(String[] antiprompt)
  45. ```
  46. #### Parameters
  47. `antiprompt` [String[]](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  48. #### Returns
  49. [ChatSession&lt;T&gt;](./llama.chatsession-1.md)<br>