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.oldversion.chatsession-1.md 2.1 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. # ChatSession<T>
  2. Namespace: LLama.OldVersion
  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.oldversion.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, String)**
  18. ```csharp
  19. public IEnumerable<string> Chat(string text, string prompt, string encoding)
  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. `encoding` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  25. #### Returns
  26. [IEnumerable&lt;String&gt;](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)<br>
  27. ### **WithPrompt(String, String)**
  28. ```csharp
  29. public ChatSession<T> WithPrompt(string prompt, string encoding)
  30. ```
  31. #### Parameters
  32. `prompt` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  33. `encoding` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  34. #### Returns
  35. [ChatSession&lt;T&gt;](./llama.oldversion.chatsession-1.md)<br>
  36. ### **WithPromptFile(String, String)**
  37. ```csharp
  38. public ChatSession<T> WithPromptFile(string promptFilename, string encoding)
  39. ```
  40. #### Parameters
  41. `promptFilename` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  42. `encoding` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  43. #### Returns
  44. [ChatSession&lt;T&gt;](./llama.oldversion.chatsession-1.md)<br>
  45. ### **WithAntiprompt(String[])**
  46. Set the keyword to split the return value of chat AI.
  47. ```csharp
  48. public ChatSession<T> WithAntiprompt(String[] antiprompt)
  49. ```
  50. #### Parameters
  51. `antiprompt` [String[]](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  52. #### Returns
  53. [ChatSession&lt;T&gt;](./llama.oldversion.chatsession-1.md)<br>