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.extensions.dictionaryextension.md 1.2 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # DictionaryExtension
  2. Namespace: LLama.Extensions
  3. ```csharp
  4. public static class DictionaryExtension
  5. ```
  6. Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [DictionaryExtension](./llama.extensions.dictionaryextension.md)
  7. ## Methods
  8. ### **Deconstruct<T1, T2>(KeyValuePair<T1, T2>, T1&, T2&)**
  9. ```csharp
  10. public static void Deconstruct<T1, T2>(KeyValuePair<T1, T2> pair, T1& first, T2& second)
  11. ```
  12. #### Type Parameters
  13. `T1`<br>
  14. `T2`<br>
  15. #### Parameters
  16. `pair` KeyValuePair&lt;T1, T2&gt;<br>
  17. `first` T1&<br>
  18. `second` T2&<br>
  19. ### **Update&lt;T1, T2&gt;(Dictionary&lt;T1, T2&gt;, IDictionary&lt;T1, T2&gt;)**
  20. ```csharp
  21. public static void Update<T1, T2>(Dictionary<T1, T2> dic, IDictionary<T1, T2> other)
  22. ```
  23. #### Type Parameters
  24. `T1`<br>
  25. `T2`<br>
  26. #### Parameters
  27. `dic` Dictionary&lt;T1, T2&gt;<br>
  28. `other` IDictionary&lt;T1, T2&gt;<br>
  29. ### **GetOrDefault&lt;T1, T2&gt;(Dictionary&lt;T1, T2&gt;, T1, T2)**
  30. ```csharp
  31. public static T2 GetOrDefault<T1, T2>(Dictionary<T1, T2> dic, T1 key, T2 defaultValue)
  32. ```
  33. #### Type Parameters
  34. `T1`<br>
  35. `T2`<br>
  36. #### Parameters
  37. `dic` Dictionary&lt;T1, T2&gt;<br>
  38. `key` T1<br>
  39. `defaultValue` T2<br>
  40. #### Returns
  41. T2<br>

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