Describe local Domovoy capabilities #375
@@ -763,6 +763,9 @@ func main() {
|
|||||||
planningReply = "Я умею общаться, сохранять контекст, искать проверяемую информацию и работать с подключёнными моделями. Дополнительные действия подключаются отдельно."
|
planningReply = "Я умею общаться, сохранять контекст, искать проверяемую информацию и работать с подключёнными моделями. Дополнительные действия подключаются отдельно."
|
||||||
}
|
}
|
||||||
needsCognition = false
|
needsCognition = false
|
||||||
|
case interaction.InformationRequestLocalCapabilityInventory:
|
||||||
|
planningReply = "Без внешних моделей я могу поддерживать разговор, хранить контекст, вести цели и напоминания, а также честно сообщать состояние подключённых возможностей."
|
||||||
|
needsCognition = false
|
||||||
case interaction.InformationRequestCognitiveModelInventory:
|
case interaction.InformationRequestCognitiveModelInventory:
|
||||||
candidates, inventoryErr := capabilityRepository.LoadCognitiveCandidates(r.Context(), capability.CapabilityID("creator-advisory"), session.PrincipalID)
|
candidates, inventoryErr := capabilityRepository.LoadCognitiveCandidates(r.Context(), capability.CapabilityID("creator-advisory"), session.PrincipalID)
|
||||||
planningReply = humanCognitiveModelInventory(candidates, inventoryErr)
|
planningReply = humanCognitiveModelInventory(candidates, inventoryErr)
|
||||||
|
|||||||
@@ -27,52 +27,53 @@ type SemanticCandidateSelectionState string
|
|||||||
type InformationRequestKind string
|
type InformationRequestKind string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
ChannelWebChat Channel = "WEB_CHAT"
|
ChannelWebChat Channel = "WEB_CHAT"
|
||||||
ConversationOpen ConversationState = "OPEN"
|
ConversationOpen ConversationState = "OPEN"
|
||||||
ConversationArchived ConversationState = "ARCHIVED"
|
ConversationArchived ConversationState = "ARCHIVED"
|
||||||
SpeechActDirective SpeechAct = "DIRECTIVE"
|
SpeechActDirective SpeechAct = "DIRECTIVE"
|
||||||
SpeechActAssertion SpeechAct = "ASSERTION"
|
SpeechActAssertion SpeechAct = "ASSERTION"
|
||||||
SpeechActDecision SpeechAct = "DECISION"
|
SpeechActDecision SpeechAct = "DECISION"
|
||||||
SpeechActPreference SpeechAct = "PREFERENCE"
|
SpeechActPreference SpeechAct = "PREFERENCE"
|
||||||
SpeechActQuestion SpeechAct = "QUESTION"
|
SpeechActQuestion SpeechAct = "QUESTION"
|
||||||
SpeechActHypothesis SpeechAct = "HYPOTHESIS"
|
SpeechActHypothesis SpeechAct = "HYPOTHESIS"
|
||||||
SpeechActCorrection SpeechAct = "CORRECTION"
|
SpeechActCorrection SpeechAct = "CORRECTION"
|
||||||
SpeechActRequestToInvestigate SpeechAct = "REQUEST_TO_INVESTIGATE"
|
SpeechActRequestToInvestigate SpeechAct = "REQUEST_TO_INVESTIGATE"
|
||||||
SpeechActConfirmation SpeechAct = "CONFIRMATION"
|
SpeechActConfirmation SpeechAct = "CONFIRMATION"
|
||||||
SpeechActRejection SpeechAct = "REJECTION"
|
SpeechActRejection SpeechAct = "REJECTION"
|
||||||
SpeechActCancellation SpeechAct = "CANCELLATION"
|
SpeechActCancellation SpeechAct = "CANCELLATION"
|
||||||
SpeechActConversational SpeechAct = "CONVERSATIONAL"
|
SpeechActConversational SpeechAct = "CONVERSATIONAL"
|
||||||
SpeechActUnknown SpeechAct = "UNKNOWN"
|
SpeechActUnknown SpeechAct = "UNKNOWN"
|
||||||
InterpretationRecorded InterpretationState = "RECORDED"
|
InterpretationRecorded InterpretationState = "RECORDED"
|
||||||
InterpretationInterpreted InterpretationState = "INTERPRETED"
|
InterpretationInterpreted InterpretationState = "INTERPRETED"
|
||||||
RelationCorrects InteractionRelationKind = "CORRECTS"
|
RelationCorrects InteractionRelationKind = "CORRECTS"
|
||||||
RelationRespondsTo InteractionRelationKind = "RESPONDS_TO"
|
RelationRespondsTo InteractionRelationKind = "RESPONDS_TO"
|
||||||
RelationRequestsCognition InteractionRelationKind = "REQUESTS_COGNITION"
|
RelationRequestsCognition InteractionRelationKind = "REQUESTS_COGNITION"
|
||||||
RelationCognitionFallback InteractionRelationKind = "COGNITION_FALLBACK"
|
RelationCognitionFallback InteractionRelationKind = "COGNITION_FALLBACK"
|
||||||
RelationSupersedes InteractionRelationKind = "SUPERSEDES"
|
RelationSupersedes InteractionRelationKind = "SUPERSEDES"
|
||||||
RelationClarifies InteractionRelationKind = "CLARIFIES"
|
RelationClarifies InteractionRelationKind = "CLARIFIES"
|
||||||
ProjectRolePrimary ProjectReferenceRole = "PRIMARY"
|
ProjectRolePrimary ProjectReferenceRole = "PRIMARY"
|
||||||
ProjectRoleRelated ProjectReferenceRole = "RELATED"
|
ProjectRoleRelated ProjectReferenceRole = "RELATED"
|
||||||
ProjectRoleReferenceSource ProjectReferenceRole = "REFERENCE_SOURCE"
|
ProjectRoleReferenceSource ProjectReferenceRole = "REFERENCE_SOURCE"
|
||||||
ClarificationNotRequired ClarificationState = "NOT_REQUIRED"
|
ClarificationNotRequired ClarificationState = "NOT_REQUIRED"
|
||||||
ClarificationRequired ClarificationState = "REQUIRED"
|
ClarificationRequired ClarificationState = "REQUIRED"
|
||||||
SemanticApplicable SemanticApplicability = "APPLICABLE"
|
SemanticApplicable SemanticApplicability = "APPLICABLE"
|
||||||
SemanticLowConfidence SemanticApplicability = "LOW_CONFIDENCE"
|
SemanticLowConfidence SemanticApplicability = "LOW_CONFIDENCE"
|
||||||
SemanticMixedIntent SemanticApplicability = "MIXED_INTENT"
|
SemanticMixedIntent SemanticApplicability = "MIXED_INTENT"
|
||||||
SemanticNeedsBroaderInterpret SemanticApplicability = "NEEDS_BROADER_INTERPRETATION"
|
SemanticNeedsBroaderInterpret SemanticApplicability = "NEEDS_BROADER_INTERPRETATION"
|
||||||
SemanticCandidateClarify SemanticApplicability = "CLARIFICATION_REQUIRED"
|
SemanticCandidateClarify SemanticApplicability = "CLARIFICATION_REQUIRED"
|
||||||
CandidateSourceDeterministic SemanticCandidateSource = "DETERMINISTIC_V2"
|
CandidateSourceDeterministic SemanticCandidateSource = "DETERMINISTIC_V2"
|
||||||
CandidateSourceCognitive SemanticCandidateSource = "COGNITIVE_V1"
|
CandidateSourceCognitive SemanticCandidateSource = "COGNITIVE_V1"
|
||||||
CandidateSelected SemanticCandidateSelectionState = "SELECTED"
|
CandidateSelected SemanticCandidateSelectionState = "SELECTED"
|
||||||
CandidateObserved SemanticCandidateSelectionState = "OBSERVED"
|
CandidateObserved SemanticCandidateSelectionState = "OBSERVED"
|
||||||
CandidateRejected SemanticCandidateSelectionState = "REJECTED"
|
CandidateRejected SemanticCandidateSelectionState = "REJECTED"
|
||||||
InformationRequestCapabilityInventory InformationRequestKind = "CAPABILITY_INVENTORY"
|
InformationRequestCapabilityInventory InformationRequestKind = "CAPABILITY_INVENTORY"
|
||||||
InformationRequestCognitiveModelInventory InformationRequestKind = "COGNITIVE_MODEL_INVENTORY"
|
InformationRequestLocalCapabilityInventory InformationRequestKind = "LOCAL_CAPABILITY_INVENTORY"
|
||||||
InformationRequestCognitiveCurrentModel InformationRequestKind = "COGNITIVE_CURRENT_MODEL"
|
InformationRequestCognitiveModelInventory InformationRequestKind = "COGNITIVE_MODEL_INVENTORY"
|
||||||
InformationRequestCognitiveChannelStatus InformationRequestKind = "COGNITIVE_CHANNEL_STATUS"
|
InformationRequestCognitiveCurrentModel InformationRequestKind = "COGNITIVE_CURRENT_MODEL"
|
||||||
InformationRequestCognitiveRecovery InformationRequestKind = "COGNITIVE_RECOVERY"
|
InformationRequestCognitiveChannelStatus InformationRequestKind = "COGNITIVE_CHANNEL_STATUS"
|
||||||
InformationRequestMemoryInventory InformationRequestKind = "MEMORY_INVENTORY"
|
InformationRequestCognitiveRecovery InformationRequestKind = "COGNITIVE_RECOVERY"
|
||||||
InformationRequestTimeDifference InformationRequestKind = "TIME_DIFFERENCE"
|
InformationRequestMemoryInventory InformationRequestKind = "MEMORY_INVENTORY"
|
||||||
|
InformationRequestTimeDifference InformationRequestKind = "TIME_DIFFERENCE"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Conversation struct {
|
type Conversation struct {
|
||||||
|
|||||||
@@ -663,6 +663,9 @@ func informationRequestKind(message string, candidate interaction.SemanticCandid
|
|||||||
}
|
}
|
||||||
capabilitySubject := containsStemInTokens(tokens, "уме", "возможност", "способн", "capabilit") || (containsMeaningfulInterrogative(tokens) && containsToken(tokens, "можешь"))
|
capabilitySubject := containsStemInTokens(tokens, "уме", "возможност", "способн", "capabilit") || (containsMeaningfulInterrogative(tokens) && containsToken(tokens, "можешь"))
|
||||||
if inquiry && capabilitySubject {
|
if inquiry && capabilitySubject {
|
||||||
|
if containsStemInTokens(tokens, "без", "внешн", "локальн") && containsStemInTokens(tokens, "модел", "ии", "ai") {
|
||||||
|
return interaction.InformationRequestLocalCapabilityInventory
|
||||||
|
}
|
||||||
return interaction.InformationRequestCapabilityInventory
|
return interaction.InformationRequestCapabilityInventory
|
||||||
}
|
}
|
||||||
recoveryCue := containsStemInTokens(tokens, "восстанов", "исправ", "почин", "подключ", "настро", "недоступ", "нет")
|
recoveryCue := containsStemInTokens(tokens, "восстанов", "исправ", "почин", "подключ", "настро", "недоступ", "нет")
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ func TestInformationRequestsAreClassifiedOnceByInteraction(t *testing.T) {
|
|||||||
{"какие модели доступны?", interaction.InformationRequestCognitiveModelInventory},
|
{"какие модели доступны?", interaction.InformationRequestCognitiveModelInventory},
|
||||||
{"назови доступные модели", interaction.InformationRequestCognitiveModelInventory},
|
{"назови доступные модели", interaction.InformationRequestCognitiveModelInventory},
|
||||||
{"какая модель отвечает?", interaction.InformationRequestCognitiveCurrentModel},
|
{"какая модель отвечает?", interaction.InformationRequestCognitiveCurrentModel},
|
||||||
{"что ты можешь сделать без внешних моделей?", interaction.InformationRequestCapabilityInventory},
|
{"что ты можешь сделать без внешних моделей?", interaction.InformationRequestLocalCapabilityInventory},
|
||||||
{"что ты умеешь?", interaction.InformationRequestCapabilityInventory},
|
{"что ты умеешь?", interaction.InformationRequestCapabilityInventory},
|
||||||
{"проверь состояние локального канала", interaction.InformationRequestCognitiveChannelStatus},
|
{"проверь состояние локального канала", interaction.InformationRequestCognitiveChannelStatus},
|
||||||
{"нет связи с ИИ, восстанови канал", interaction.InformationRequestCognitiveRecovery},
|
{"нет связи с ИИ, восстанови канал", interaction.InformationRequestCognitiveRecovery},
|
||||||
|
|||||||
Reference in New Issue
Block a user