Skip to content

Commit

Permalink
Added inline documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
patchoulish committed Nov 2, 2024
1 parent dd06177 commit 5d00b45
Show file tree
Hide file tree
Showing 24 changed files with 257 additions and 198 deletions.
10 changes: 6 additions & 4 deletions source/Kagi/KagiAnswerData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,28 @@
namespace Kagi
{
/// <summary>
///
/// Represents the response data for a
/// <see cref="KagiAnswerResult"/>.
/// </summary>
public class KagiAnswerData
{
/// <summary>
///
/// The answer output.
/// </summary>
[JsonPropertyName(
"output")]
public string Output { get; init; }

/// <summary>
///
/// A collection of <see cref="KagiAnswerDataReference"/>
/// search records that were utilized to produce the answer output.
/// </summary>
[JsonPropertyName(
"references")]
public ImmutableArray<KagiAnswerDataReference> References { get; init; }

/// <summary>
///
/// The number of tokens processed to produce the answer output.
/// </summary>
[JsonPropertyName(
"tokens")]
Expand Down
8 changes: 4 additions & 4 deletions source/Kagi/KagiAnswerDataReference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@
namespace Kagi
{
/// <summary>
///
/// Represents a search record that was utilized to produce the output for an answer.
/// </summary>
public class KagiAnswerDataReference
{
/// <summary>
///
/// The title of the referenced search record.
/// </summary>
[JsonPropertyName(
"title")]
public string Title { get; init; }

/// <summary>
///
/// The snippet of the referenced search record, if any.
/// </summary>
[JsonPropertyName(
"Snippet")]
public string Snippet { get; init; }

/// <summary>
///
/// The URL of the referenced search record.
/// </summary>
[JsonPropertyName(
"url")]
Expand Down
9 changes: 5 additions & 4 deletions source/Kagi/KagiAnswerOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,23 @@
namespace Kagi
{
/// <summary>
///
/// Represents the options for an answer operation.
/// </summary>
public class KagiAnswerOptions
{
/// <summary>
///
/// The query to be answered.
/// </summary>
[JsonPropertyName(
"query")]
public string Query { get; init; }

/// <summary>
///
/// Whether to allow cached requests and responses.
/// </summary>
[JsonPropertyName(
"cache")]
public bool AllowCaching { get; init; }
public bool AllowCaching { get; init; } =
true;
}
}
4 changes: 2 additions & 2 deletions source/Kagi/KagiAnswerResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
namespace Kagi
{
/// <summary>
///
/// Represents the result of an answer operation.
/// </summary>
public class KagiAnswerResult :
KagiResult
{
/// <summary>
///
/// The response data for the result.
/// </summary>
[JsonPropertyName(
"data")]
Expand Down
Loading

0 comments on commit 5d00b45

Please sign in to comment.