mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-06-24 14:32:03 +00:00
* First workin version of the C# bindings * Update README.md Signed-off-by: mvenditto <venditto.matteo@gmail.com> * Added more docs + fixed prompt callback signature * build scripts revision * Added .editorconfig + fixed style issues --------- Signed-off-by: mvenditto <venditto.matteo@gmail.com>
31 lines
1.4 KiB
C#
31 lines
1.4 KiB
C#
namespace Gpt4All;
|
|
|
|
/// <summary>
|
|
/// Interface for text prediction services
|
|
/// </summary>
|
|
public interface ITextPrediction
|
|
{
|
|
/// <summary>
|
|
/// Get prediction results for the prompt and provided options.
|
|
/// </summary>
|
|
/// <param name="text">The text to complete</param>
|
|
/// <param name="opts">The prediction settings</param>
|
|
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
|
|
/// <returns>The prediction result generated by the model</returns>
|
|
Task<ITextPredictionResult> GetPredictionAsync(
|
|
string text,
|
|
PredictRequestOptions opts,
|
|
CancellationToken cancellation = default);
|
|
|
|
/// <summary>
|
|
/// Get streaming prediction results for the prompt and provided options.
|
|
/// </summary>
|
|
/// <param name="text">The text to complete</param>
|
|
/// <param name="opts">The prediction settings</param>
|
|
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
|
|
/// <returns>The prediction result generated by the model</returns>
|
|
Task<ITextPredictionStreamingResult> GetStreamingPredictionAsync(
|
|
string text,
|
|
PredictRequestOptions opts,
|
|
CancellationToken cancellationToken = default);
|
|
} |