chatKnowledgeEnabled reports whether the chat-mode knowledge exception is on. Default is ON when the env var is unset.
()
| 35 | // chatKnowledgeEnabled reports whether the chat-mode knowledge exception is |
| 36 | // on. Default is ON when the env var is unset. |
| 37 | func chatKnowledgeEnabled() bool { |
| 38 | switch strings.ToLower(strings.TrimSpace(os.Getenv(chatKnowledgeEnvVar))) { |
| 39 | case "false", "0", "off", "no": |
| 40 | return false |
| 41 | case "true", "1", "on", "yes": |
| 42 | return true |
| 43 | default: |
| 44 | return true // default ON |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | // chatKnowledgeActive reports whether the exception applies to THIS turn: |
| 49 | // enabled and at least one knowledge base attached to the session. Without an |
no outgoing calls