Skip to content

Commit

Permalink
Using IReadOnlyList instead of IEnumerable in IInferenceParams
Browse files Browse the repository at this point in the history
  • Loading branch information
martindevans committed Oct 28, 2023
1 parent aae63a5 commit c786fb0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion LLama.Web/Common/InferenceOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class InferenceOptions : IInferenceParams
/// <summary>
/// Sequences where the model will stop generating further tokens.
/// </summary>
public IEnumerable<string> AntiPrompts { get; set; } = Array.Empty<string>();
public IReadOnlyList<string> AntiPrompts { get; set; } = Array.Empty<string>();
/// <summary>
/// path to file for saving/loading model eval state
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion LLama/Abstractions/IInferenceParams.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public interface IInferenceParams
/// <summary>
/// Sequences where the model will stop generating further tokens.
/// </summary>
public IEnumerable<string> AntiPrompts { get; set; }
public IReadOnlyList<string> AntiPrompts { get; set; }

/// <summary>
/// 0 or lower to use vocab size
Expand Down
2 changes: 1 addition & 1 deletion LLama/Common/InferenceParams.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public record InferenceParams : IInferenceParams
/// <summary>
/// Sequences where the model will stop generating further tokens.
/// </summary>
public IEnumerable<string> AntiPrompts { get; set; } = Array.Empty<string>();
public IReadOnlyList<string> AntiPrompts { get; set; } = Array.Empty<string>();

/// <summary>
/// 0 or lower to use vocab size
Expand Down

0 comments on commit c786fb0

Please sign in to comment.