DEV-000066 resolve prospective responses by summary
This commit is contained in:
@@ -168,7 +168,11 @@ func matchingCandidates(message string, candidates []ResponseCandidate) []Respon
|
||||
lower := strings.ToLower(message)
|
||||
var matched []ResponseCandidate
|
||||
for _, candidate := range candidates {
|
||||
if summaryMatches(lower, candidate.Attention.Summary) {
|
||||
summary := candidate.Attention.Summary
|
||||
if summary == "" {
|
||||
summary = candidate.Prospective.Summary
|
||||
}
|
||||
if summaryMatches(lower, summary) {
|
||||
matched = append(matched, candidate)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user