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.

ILLamaExecutor.cs 1.1 kB

1234567891011121314151617181920212223242526272829303132
  1. using System.Collections.Generic;
  2. using System.Threading;
  3. namespace LLama.Abstractions
  4. {
  5. /// <summary>
  6. /// A high level interface for LLama models.
  7. /// </summary>
  8. public interface ILLamaExecutor
  9. {
  10. /// <summary>
  11. /// The loaded context for this executor.
  12. /// </summary>
  13. public LLamaContext Context { get; }
  14. // LLava Section
  15. public bool IsMultiModal { get; }
  16. public bool MultiModalProject { get; }
  17. public LLavaWeights? ClipModel { get; }
  18. public string ImagePath { get; set; }
  19. /// <summary>
  20. /// Asynchronously infers a response from the model.
  21. /// </summary>
  22. /// <param name="text">Your prompt</param>
  23. /// <param name="inferenceParams">Any additional parameters</param>
  24. /// <param name="token">A cancellation token.</param>
  25. /// <returns></returns>
  26. IAsyncEnumerable<string> InferAsync(string text, IInferenceParams? inferenceParams = null, CancellationToken token = default);
  27. }
  28. }