-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
…x typos
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
|
||
namespace Microsoft.KernelMemory; | ||
|
||
public class GeneratedTextContent | ||
{ | ||
public string Text { get; set; } | ||
|
||
public TokenUsage? TokenUsage { get; set; } | ||
|
||
public GeneratedTextContent(string text, TokenUsage? tokenUsage = null) | ||
{ | ||
this.Text = text; | ||
this.TokenUsage = tokenUsage; | ||
} | ||
|
||
/// <inheritdoc/> | ||
public override string ToString() | ||
{ | ||
return this.Text; | ||
} | ||
|
||
/// <summary> | ||
/// Convert a string to an instance of GeneratedTextContent | ||
/// </summary> | ||
/// <param name="text">Text content</param> | ||
public static implicit operator GeneratedTextContent(string text) | ||
Check failure on line 27 in service/Abstractions/Models/GeneratedTextContent.cs GitHub Actions / Build (8.0.x, ubuntu-latest, Debug)
Check failure on line 27 in service/Abstractions/Models/GeneratedTextContent.cs GitHub Actions / Build (8.0.x, ubuntu-latest, Debug)
Check failure on line 27 in service/Abstractions/Models/GeneratedTextContent.cs GitHub Actions / Build (8.0.x, ubuntu-latest, Release)
Check failure on line 27 in service/Abstractions/Models/GeneratedTextContent.cs GitHub Actions / Build (8.0.x, ubuntu-latest, Release)
Check warning on line 27 in service/Abstractions/Models/GeneratedTextContent.cs GitHub Actions / Unit Tests (8.0.x, ubuntu-latest)
Check warning on line 27 in service/Abstractions/Models/GeneratedTextContent.cs GitHub Actions / Unit Tests (8.0.x, ubuntu-latest)
Check warning on line 27 in service/Abstractions/Models/GeneratedTextContent.cs GitHub Actions / Unit Tests (8.0.x, windows-latest)
Check warning on line 27 in service/Abstractions/Models/GeneratedTextContent.cs GitHub Actions / Unit Tests (8.0.x, windows-latest)
|
||
{ | ||
return new GeneratedTextContent(text); | ||
} | ||
} |
This file was deleted.