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.

NativeLibraryFromPath.cs 758 B

12345678910111213141516171819202122232425262728293031
  1. using LLama.Abstractions;
  2. using System.Collections.Generic;
  3. namespace LLama.Native
  4. {
  5. /// <summary>
  6. /// A native library specified with a lcoal file path.
  7. /// </summary>
  8. public class NativeLibraryFromPath: INativeLibrary
  9. {
  10. private string _path;
  11. /// <inheritdoc/>
  12. public NativeLibraryMetadata? Metadata => null;
  13. /// <summary>
  14. ///
  15. /// </summary>
  16. /// <param name="path"></param>
  17. public NativeLibraryFromPath(string path)
  18. {
  19. _path = path;
  20. }
  21. /// <inheritdoc/>
  22. public IEnumerable<string> Prepare(SystemInfo systemInfo, NativeLogConfig.LLamaLogCallback? logCallback)
  23. {
  24. return [_path];
  25. }
  26. }
  27. }