mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-10-08 21:40:21 +00:00
Refactored data classes into dedicated files
This commit is contained in:
parent
9d31ce62c3
commit
b7f69ed8db
8
app/MindWork AI Studio/Provider/Perplexity/Choice.cs
Normal file
8
app/MindWork AI Studio/Provider/Perplexity/Choice.cs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
namespace AIStudio.Provider.Perplexity;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Data model for a choice made by the AI.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="Index">The index of the choice.</param>
|
||||||
|
/// <param name="Delta">The delta text of the choice.</param>
|
||||||
|
public readonly record struct Choice(int Index, Delta Delta);
|
7
app/MindWork AI Studio/Provider/Perplexity/Delta.cs
Normal file
7
app/MindWork AI Studio/Provider/Perplexity/Delta.cs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
namespace AIStudio.Provider.Perplexity;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The delta text of a choice.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="Content">The content of the delta text.</param>
|
||||||
|
public readonly record struct Delta(string Content);
|
@ -22,24 +22,4 @@ public readonly record struct ResponseStreamLine(string Id, string Object, uint
|
|||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public IList<ISource> GetSources() => this.SearchResults.Cast<ISource>().ToList();
|
public IList<ISource> GetSources() => this.SearchResults.Cast<ISource>().ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Data model for a choice made by the AI.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="Index">The index of the choice.</param>
|
|
||||||
/// <param name="Delta">The delta text of the choice.</param>
|
|
||||||
public readonly record struct Choice(int Index, Delta Delta);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The delta text of a choice.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="Content">The content of the delta text.</param>
|
|
||||||
public readonly record struct Delta(string Content);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Data model for a search result.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="Title">The title of the search result.</param>
|
|
||||||
/// <param name="URL">The URL of the search result.</param>
|
|
||||||
public sealed record SearchResult(string Title, string URL) : Source(Title, URL);
|
|
@ -0,0 +1,8 @@
|
|||||||
|
namespace AIStudio.Provider.Perplexity;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Data model for a search result.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="Title">The title of the search result.</param>
|
||||||
|
/// <param name="URL">The URL of the search result.</param>
|
||||||
|
public sealed record SearchResult(string Title, string URL) : Source(Title, URL);
|
Loading…
Reference in New Issue
Block a user