feat: add ai chatbot
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type Base struct {
|
||||
ID uint `gorm:"primarykey" json:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
// type SoftDelete struct {
|
||||
// DeletedAt gorm.DeletedAt `gorm:"index" json:"deleted_at"`
|
||||
// }
|
||||
@@ -0,0 +1,10 @@
|
||||
package models
|
||||
|
||||
type Chat struct {
|
||||
Base
|
||||
|
||||
SessionID uint `json:"session_id"`
|
||||
Session Session `json:"session"`
|
||||
Role string `json:"role"`
|
||||
Content string `json:"content"`
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package models
|
||||
|
||||
type Session struct {
|
||||
Base
|
||||
|
||||
UUID string `gorm:"uniqueIndex" json:"uuid"`
|
||||
}
|
||||
Reference in New Issue
Block a user