feat: add DingTalk directory-backed session titles
This commit is contained in:
@@ -40,10 +40,13 @@ type QARequest struct {
|
||||
TenantKey string
|
||||
Channel string
|
||||
ConversationType ConversationType
|
||||
ConversationTitle string
|
||||
ExternalChatID string
|
||||
ExternalUserID string
|
||||
ExternalMessageID string
|
||||
SenderName string
|
||||
Department string
|
||||
Region string
|
||||
Query string
|
||||
Images []ImageInput
|
||||
MessageType string
|
||||
@@ -77,8 +80,11 @@ type SessionMapping struct {
|
||||
ConversationType ConversationType
|
||||
ExternalSubjectID string
|
||||
WeKnoraSessionID string
|
||||
DisplayTitle string
|
||||
}
|
||||
|
||||
type SessionTitleUpdate func(ctx context.Context, sessionID, title string) error
|
||||
|
||||
type Turn struct {
|
||||
ID string
|
||||
TenantKey string
|
||||
@@ -89,9 +95,12 @@ type Turn struct {
|
||||
WeKnoraRequestID string
|
||||
AgentID string
|
||||
ConversationType ConversationType
|
||||
ConversationTitle string
|
||||
ExternalChatID string
|
||||
ExternalUserID string
|
||||
SenderName string
|
||||
DepartmentSnapshot string
|
||||
RegionSnapshot string
|
||||
MessageType string
|
||||
ActorID string
|
||||
ConversationID string
|
||||
@@ -143,6 +152,7 @@ var ErrDeliveryUpdateFailed = errors.New("delivery update failed: RowsAffected !
|
||||
type Repository interface {
|
||||
BeginTurn(ctx context.Context, turn Turn) (Turn, bool, error)
|
||||
ResolveSession(ctx context.Context, mapping SessionMapping, create func(context.Context) (string, error)) (string, error)
|
||||
SyncSessionTitle(ctx context.Context, mapping SessionMapping, title string, update SessionTitleUpdate) error
|
||||
FinishTurn(ctx context.Context, turn Turn) error
|
||||
RecordDelivery(ctx context.Context, du DeliveryUpdate) error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user