feat(types): add shared types for messages, moods, personality traits, and diary
This commit is contained in:
44
pkg/types/types.go
Normal file
44
pkg/types/types.go
Normal file
@@ -0,0 +1,44 @@
|
||||
package types
|
||||
|
||||
import "time"
|
||||
|
||||
type Role string
|
||||
|
||||
const (
|
||||
RoleUser Role = "user"
|
||||
RoleAssistant Role = "assistant"
|
||||
RoleSystem Role = "system"
|
||||
RoleTool Role = "tool"
|
||||
)
|
||||
|
||||
type Message struct {
|
||||
ID string `json:"id"`
|
||||
Role Role `json:"role"`
|
||||
Content string `json:"content"`
|
||||
ToolCall *ToolCall `json:"toolCall,omitempty"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
}
|
||||
|
||||
type ToolCall struct {
|
||||
Name string `json:"name"`
|
||||
Arguments string `json:"arguments"`
|
||||
Result string `json:"result,omitempty"`
|
||||
}
|
||||
|
||||
type Conversation struct {
|
||||
ID string `json:"id"`
|
||||
Messages []Message `json:"messages"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
type Mood string
|
||||
|
||||
const (
|
||||
MoodNeutral Mood = "neutral"
|
||||
MoodCurious Mood = "curious"
|
||||
MoodPlayful Mood = "playful"
|
||||
MoodThoughtful Mood = "thoughtful"
|
||||
MoodAnnoyed Mood = "annoyed"
|
||||
MoodTired Mood = "tired"
|
||||
)
|
||||
Reference in New Issue
Block a user