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.chatcompletion.md 4.2 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. # ChatCompletion
  2. Namespace: LLama.OldVersion
  3. ```csharp
  4. public class ChatCompletion : System.IEquatable`1[[LLama.OldVersion.ChatCompletion, LLamaSharp, Version=0.4.0.0, Culture=neutral, PublicKeyToken=null]]
  5. ```
  6. Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ChatCompletion](./llama.oldversion.chatcompletion.md)<br>
  7. Implements [IEquatable&lt;ChatCompletion&gt;](https://docs.microsoft.com/en-us/dotnet/api/system.iequatable-1)
  8. ## Properties
  9. ### **Id**
  10. ```csharp
  11. public string Id { get; set; }
  12. ```
  13. #### Property Value
  14. [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  15. ### **Object**
  16. ```csharp
  17. public string Object { get; set; }
  18. ```
  19. #### Property Value
  20. [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  21. ### **Created**
  22. ```csharp
  23. public int Created { get; set; }
  24. ```
  25. #### Property Value
  26. [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)<br>
  27. ### **Model**
  28. ```csharp
  29. public string Model { get; set; }
  30. ```
  31. #### Property Value
  32. [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  33. ### **Choices**
  34. ```csharp
  35. public ChatCompletionChoice[] Choices { get; set; }
  36. ```
  37. #### Property Value
  38. [ChatCompletionChoice[]](./llama.oldversion.chatcompletionchoice.md)<br>
  39. ### **Usage**
  40. ```csharp
  41. public CompletionUsage Usage { get; set; }
  42. ```
  43. #### Property Value
  44. [CompletionUsage](./llama.oldversion.completionusage.md)<br>
  45. ## Constructors
  46. ### **ChatCompletion(String, String, Int32, String, ChatCompletionChoice[], CompletionUsage)**
  47. ```csharp
  48. public ChatCompletion(string Id, string Object, int Created, string Model, ChatCompletionChoice[] Choices, CompletionUsage Usage)
  49. ```
  50. #### Parameters
  51. `Id` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  52. `Object` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  53. `Created` [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)<br>
  54. `Model` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  55. `Choices` [ChatCompletionChoice[]](./llama.oldversion.chatcompletionchoice.md)<br>
  56. `Usage` [CompletionUsage](./llama.oldversion.completionusage.md)<br>
  57. ## Methods
  58. ### **ToString()**
  59. ```csharp
  60. public string ToString()
  61. ```
  62. #### Returns
  63. [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  64. ### **PrintMembers(StringBuilder)**
  65. ```csharp
  66. protected bool PrintMembers(StringBuilder builder)
  67. ```
  68. #### Parameters
  69. `builder` [StringBuilder](https://docs.microsoft.com/en-us/dotnet/api/system.text.stringbuilder)<br>
  70. #### Returns
  71. [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)<br>
  72. ### **GetHashCode()**
  73. ```csharp
  74. public int GetHashCode()
  75. ```
  76. #### Returns
  77. [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)<br>
  78. ### **Equals(Object)**
  79. ```csharp
  80. public bool Equals(object obj)
  81. ```
  82. #### Parameters
  83. `obj` [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)<br>
  84. #### Returns
  85. [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)<br>
  86. ### **Equals(ChatCompletion)**
  87. ```csharp
  88. public bool Equals(ChatCompletion other)
  89. ```
  90. #### Parameters
  91. `other` [ChatCompletion](./llama.oldversion.chatcompletion.md)<br>
  92. #### Returns
  93. [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)<br>
  94. ### **&lt;Clone&gt;$()**
  95. ```csharp
  96. public ChatCompletion <Clone>$()
  97. ```
  98. #### Returns
  99. [ChatCompletion](./llama.oldversion.chatcompletion.md)<br>
  100. ### **Deconstruct(String&, String&, Int32&, String&, ChatCompletionChoice[]&, CompletionUsage&)**
  101. ```csharp
  102. public void Deconstruct(String& Id, String& Object, Int32& Created, String& Model, ChatCompletionChoice[]& Choices, CompletionUsage& Usage)
  103. ```
  104. #### Parameters
  105. `Id` [String&](https://docs.microsoft.com/en-us/dotnet/api/system.string&)<br>
  106. `Object` [String&](https://docs.microsoft.com/en-us/dotnet/api/system.string&)<br>
  107. `Created` [Int32&](https://docs.microsoft.com/en-us/dotnet/api/system.int32&)<br>
  108. `Model` [String&](https://docs.microsoft.com/en-us/dotnet/api/system.string&)<br>
  109. `Choices` [ChatCompletionChoice[]&](./llama.oldversion.chatcompletionchoice&.md)<br>
  110. `Usage` [CompletionUsage&](./llama.oldversion.completionusage&.md)<br>

C#/.NET上易用的LLM高性能推理框架,支持LLaMA和LLaVA系列模型。