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 856 B

12345678910111213141516171819202122232425
  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. /// <summary>
  15. /// Asynchronously infers a response from the model.
  16. /// </summary>
  17. /// <param name="text">Your prompt</param>
  18. /// <param name="inferenceParams">Any additional parameters</param>
  19. /// <param name="cancellationToken">A cancellation token.</param>
  20. /// <returns></returns>
  21. IAsyncEnumerable<string> InferAsync(string text, IInferenceParams? inferenceParams = null, CancellationToken cancellationToken = default);
  22. }
  23. }