EveContentPart
NexusLabs.Eve¶
EveContentPart Class¶
Wraps one AI SDK-compatible user-content part.
Inheritance System.Object 🡒 EveContentPart
Implements System.IEquatable<EveContentPart>
Properties¶
EveContentPart.Json Property¶
Gets the JSON object sent to eve.
Property Value¶
Methods¶
EveContentPart.CreateFile(string, string, string) Method¶
Creates a file content part from a URL or data URL.
public static NexusLabs.Eve.EveContentPart CreateFile(string data, string mediaType, string? filename=null);
Parameters¶
data System.String
The file URL or inline data URL.
mediaType System.String
The file media type.
filename System.String
The optional filename.
Returns¶
EveContentPart
A file content part.
EveContentPart.CreateFile(ReadOnlySpan\<byte>, string, string) Method¶
Creates an inline file content part from bytes.
public static NexusLabs.Eve.EveContentPart CreateFile(System.ReadOnlySpan<byte> bytes, string mediaType, string? filename=null);
Parameters¶
bytes System.ReadOnlySpan<System.Byte>
The file bytes.
mediaType System.String
The file media type.
filename System.String
The optional filename.
Returns¶
EveContentPart
A file content part containing a base64 data URL.
EveContentPart.CreateImage(string, string) Method¶
Creates an image content part from a URL or data URL.
Parameters¶
image System.String
The image URL or inline data URL.
mediaType System.String
The optional image media type.
Returns¶
EveContentPart
An image content part.
EveContentPart.CreateText(string) Method¶
Creates a text content part.
Parameters¶
text System.String
The user text.
Returns¶
EveContentPart
A text content part.
EveContentPart.FromJson(JsonElement) Method¶
Wraps a future or custom AI SDK content-part object.
Parameters¶
json System.Text.Json.JsonElement
The content-part JSON object.
Returns¶
EveContentPart
A content part that preserves the supplied JSON.