Class MessageContent
Text:
- ChatCompletion > ChatChoice[] > Message[] > MessageContent > StringOrPart > Text
MessageContentPart:
- ChatCompletion > ChatChoice[] > Message[] > MessageContent > StringOrPart > MessageContentPart[]
Inheritance
MessageContent
Assembly: Glitch9.AIDevKit.dll
Syntax
[JsonConverter(typeof(MessageContentConverter))]
public sealed class MessageContent
Constructors
|
Edit this page
View Source
MessageContent()
Declaration
[JsonConstructor]
public MessageContent()
|
Edit this page
View Source
MessageContent(StringOr<ContentPart>[])
Declaration
public MessageContent(StringOr<ContentPart>[] parts)
Parameters
|
Edit this page
View Source
MessageContent(string)
Declaration
public MessageContent(string text)
Parameters
| Type |
Name |
Description |
| string |
text |
|
|
Edit this page
View Source
MessageContent(string[])
Declaration
public MessageContent(string[] texts)
Parameters
| Type |
Name |
Description |
| string[] |
texts |
|
Properties
|
Edit this page
View Source
Count
Declaration
public int Count { get; }
Property Value
|
Edit this page
View Source
HasParts
Declaration
public bool HasParts { get; }
Property Value
|
Edit this page
View Source
HasValue
Declaration
public bool HasValue { get; }
Property Value
|
Edit this page
View Source
IsEmpty
Declaration
public bool IsEmpty { get; }
Property Value
|
Edit this page
View Source
IsString
Declaration
public bool IsString { get; }
Property Value
Methods
|
Edit this page
View Source
AddRange<T>(IEnumerable<T>)
Declaration
public void AddRange<T>(IEnumerable<T> parts) where T : ContentPart
Parameters
Type Parameters
|
Edit this page
View Source
Add<T>(T)
Declaration
public void Add<T>(T part) where T : ContentPart
Parameters
| Type |
Name |
Description |
| T |
part |
|
Type Parameters
|
Edit this page
View Source
Append(MessageContent)
Declaration
public void Append(MessageContent content)
Parameters
|
Edit this page
View Source
FromParts(IEnumerable<ContentPart>)
Declaration
public static MessageContent FromParts(IEnumerable<ContentPart> parts)
Parameters
Returns
|
Edit this page
View Source
GetOutputText()
Declaration
public string GetOutputText()
Returns
|
Edit this page
View Source
GetParts()
Declaration
public IEnumerable<ContentPart> GetParts()
Returns
|
Edit this page
View Source
GetReasoning()
Declaration
public string GetReasoning()
Returns
|
Edit this page
View Source
GetRefusal()
Declaration
public string GetRefusal()
Returns
|
Edit this page
View Source
Remove(ContentPart)
Declaration
public void Remove(ContentPart part)
Parameters
|
Edit this page
View Source
SetOutputText(string, params Annotation[])
Declaration
public void SetOutputText(string text, params Annotation[] annotations)
Parameters
|
Edit this page
View Source
SetReasoning(string)
Declaration
public void SetReasoning(string reasoningText)
Parameters
| Type |
Name |
Description |
| string |
reasoningText |
|
|
Edit this page
View Source
SetRefusal(string)
Declaration
public void SetRefusal(string refusalText)
Parameters
| Type |
Name |
Description |
| string |
refusalText |
|
|
Edit this page
View Source
ToList()
Declaration
public List<StringOr<ContentPart>> ToList()
Returns
|
Edit this page
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
|
Edit this page
View Source
implicit operator string(MessageContent)
Declaration
public static implicit operator string(MessageContent content)
Parameters
Returns
|
Edit this page
View Source
implicit operator MessageContent(StringOr<ContentPart>[])
Declaration
public static implicit operator MessageContent(StringOr<ContentPart>[] parts)
Parameters
Returns
|
Edit this page
View Source
implicit operator MessageContent(string)
Declaration
public static implicit operator MessageContent(string text)
Parameters
| Type |
Name |
Description |
| string |
text |
|
Returns
Extension Methods