Class Knowledge
Represents a piece of knowledge with its content and origin information.
Implements
Inherited Members
Namespace: VulcanAI.Knowledge
Assembly: VulcanAI.dll
Syntax
public record Knowledge : IEquatable<Knowledge>
Remarks
This record type is immutable and represents a single piece of knowledge that can be stored and retrieved from the knowledge store. The content represents the actual knowledge, while the origin provides metadata about where this knowledge came from.
Constructors
| Edit this page View SourceKnowledge(string, string)
Initializes a new instance of the Knowledge record.
Declaration
public Knowledge(string content, string origin)
Parameters
Type | Name | Description |
---|---|---|
string | content | The content of the knowledge. |
string | origin | The origin of the knowledge. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when content or origin is null. |
ArgumentException | Thrown when content or origin is empty or whitespace. |
Properties
| Edit this page View SourceContent
Gets the content of the knowledge.
Declaration
public string Content { get; init; }
Property Value
Type | Description |
---|---|
string | The textual content representing the knowledge. |
CreatedAt
Gets the timestamp when this knowledge was created.
Declaration
public DateTimeOffset CreatedAt { get; init; }
Property Value
Type | Description |
---|---|
DateTimeOffset | The creation timestamp in UTC. |
Origin
Gets the origin of the knowledge.
Declaration
public string Origin { get; init; }
Property Value
Type | Description |
---|---|
string | A string describing where this knowledge came from. |