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.abstractions.illamaexecutor.md 1.8 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # ILLamaExecutor
  2. Namespace: LLama.Abstractions
  3. A high level interface for LLama models.
  4. ```csharp
  5. public interface ILLamaExecutor
  6. ```
  7. ## Properties
  8. ### **Context**
  9. The loaded context for this executor.
  10. ```csharp
  11. public abstract LLamaContext Context { get; }
  12. ```
  13. #### Property Value
  14. [LLamaContext](./llama.llamacontext.md)<br>
  15. ## Methods
  16. ### **Infer(String, IInferenceParams, CancellationToken)**
  17. Infers a response from the model.
  18. ```csharp
  19. IEnumerable<string> Infer(string text, IInferenceParams inferenceParams, CancellationToken token)
  20. ```
  21. #### Parameters
  22. `text` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  23. Your prompt
  24. `inferenceParams` [IInferenceParams](./llama.abstractions.iinferenceparams.md)<br>
  25. Any additional parameters
  26. `token` [CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken)<br>
  27. A cancellation token.
  28. #### Returns
  29. [IEnumerable&lt;String&gt;](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)<br>
  30. ### **InferAsync(String, IInferenceParams, CancellationToken)**
  31. Asynchronously infers a response from the model.
  32. ```csharp
  33. IAsyncEnumerable<string> InferAsync(string text, IInferenceParams inferenceParams, CancellationToken token)
  34. ```
  35. #### Parameters
  36. `text` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  37. Your prompt
  38. `inferenceParams` [IInferenceParams](./llama.abstractions.iinferenceparams.md)<br>
  39. Any additional parameters
  40. `token` [CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken)<br>
  41. A cancellation token.
  42. #### Returns
  43. [IAsyncEnumerable&lt;String&gt;](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.iasyncenumerable-1)<br>