diff --git a/app/MindWork AI Studio/Provider/Perplexity/Choice.cs b/app/MindWork AI Studio/Provider/Perplexity/Choice.cs new file mode 100644 index 00000000..2da6bd99 --- /dev/null +++ b/app/MindWork AI Studio/Provider/Perplexity/Choice.cs @@ -0,0 +1,8 @@ +namespace AIStudio.Provider.Perplexity; + +/// +/// Data model for a choice made by the AI. +/// +/// The index of the choice. +/// The delta text of the choice. +public readonly record struct Choice(int Index, Delta Delta); \ No newline at end of file diff --git a/app/MindWork AI Studio/Provider/Perplexity/Delta.cs b/app/MindWork AI Studio/Provider/Perplexity/Delta.cs new file mode 100644 index 00000000..a4f1da61 --- /dev/null +++ b/app/MindWork AI Studio/Provider/Perplexity/Delta.cs @@ -0,0 +1,7 @@ +namespace AIStudio.Provider.Perplexity; + +/// +/// The delta text of a choice. +/// +/// The content of the delta text. +public readonly record struct Delta(string Content); \ No newline at end of file diff --git a/app/MindWork AI Studio/Provider/Perplexity/ResponseStreamLine.cs b/app/MindWork AI Studio/Provider/Perplexity/ResponseStreamLine.cs index e8956a06..5ef74083 100644 --- a/app/MindWork AI Studio/Provider/Perplexity/ResponseStreamLine.cs +++ b/app/MindWork AI Studio/Provider/Perplexity/ResponseStreamLine.cs @@ -22,24 +22,4 @@ public readonly record struct ResponseStreamLine(string Id, string Object, uint /// public IList GetSources() => this.SearchResults.Cast().ToList(); -} - -/// -/// Data model for a choice made by the AI. -/// -/// The index of the choice. -/// The delta text of the choice. -public readonly record struct Choice(int Index, Delta Delta); - -/// -/// The delta text of a choice. -/// -/// The content of the delta text. -public readonly record struct Delta(string Content); - -/// -/// Data model for a search result. -/// -/// The title of the search result. -/// The URL of the search result. -public sealed record SearchResult(string Title, string URL) : Source(Title, URL); +} \ No newline at end of file diff --git a/app/MindWork AI Studio/Provider/Perplexity/SearchResult.cs b/app/MindWork AI Studio/Provider/Perplexity/SearchResult.cs new file mode 100644 index 00000000..cfd870c1 --- /dev/null +++ b/app/MindWork AI Studio/Provider/Perplexity/SearchResult.cs @@ -0,0 +1,8 @@ +namespace AIStudio.Provider.Perplexity; + +/// +/// Data model for a search result. +/// +/// The title of the search result. +/// The URL of the search result. +public sealed record SearchResult(string Title, string URL) : Source(Title, URL); \ No newline at end of file