Class Conversation
- Namespace
- Glitch9.AIDevKit.Conversations
public class Conversation : IData
- Inheritance
-
objectConversation
- Derived
- Extension Methods
Properties
AgentId
Required. Locally used to indicate which agent this conversation belongs to.
public string AgentId { get; set; }
Property Value
- string
AgentName
Optional. The name of the agent handling the conversation.
public string AgentName { get; set; }
Property Value
- string
CreatedAt
Required. The time at which the conversation was created, measured in seconds since the Unix epoch.
public UnixTime CreatedAt { get; set; }
Property Value
- UnixTime
Id
Required. The unique ID of the conversation.
public string Id { get; set; }
Property Value
- string
ItemCount
public int ItemCount { get; set; }
Property Value
- int
LastUserMessage
The last message sent by the user.
public string LastUserMessage { get; set; }
Property Value
- string
Metadata
Optional. Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
public ServerDictionary Metadata { get; set; }
Property Value
Name
Optional. The name (title) of the conversation.
public string Name { get; set; }
Property Value
- string
Object
Required. The object type, which is always conversation.
public string Object { get; set; }
Property Value
- string
StoreType
Required. Locally used to indicate which store this conversation belongs to.
public ConversationStoreType StoreType { get; set; }
Property Value
Summary
The current summary of the session.
public ChatSummary Summary { get; set; }
Property Value
TotalCostInUsd
Total cost of the session in USD. This is calculated based on the total usage and the cost per token.
public double TotalCostInUsd { get; set; }
Property Value
- double
TotalUsage
Total usage statistics for the session. This includes token usage, cost, and other metrics.
public UsageMetadata TotalUsage { get; set; }
Property Value
UpdatedAt
Last update timestamp.
public UnixTime UpdatedAt { get; set; }
Property Value
- UnixTime
Methods
Equals(object)
이 세션의 “저장되는 데이터”가 전부 같은지 비교한다. ID만 보지 않고, JSON으로 직렬화되는 모든 필드를 통째로 비교(깊은 비교).
public override bool Equals(object obj)
Parameters
objobject
Returns
- bool
GetHashCode()
Equals와 일관성을 유지하는 해시코드. 직렬화된 JSON 문자열을 바탕으로 FNV-1a 해시를 계산한다.
public override int GetHashCode()
Returns
- int
ToString()
public override string ToString()
Returns
- string