|
| 1 | +/* |
| 2 | + * Licensed to the Apache Software Foundation (ASF) under one |
| 3 | + * or more contributor license agreements. See the NOTICE file |
| 4 | + * distributed with this work for additional information |
| 5 | + * regarding copyright ownership. The ASF licenses this file |
| 6 | + * to you under the Apache License, Version 2.0 (the |
| 7 | + * "License"); you may not use this file except in compliance |
| 8 | + * with the License. You may obtain a copy of the License at |
| 9 | + * <p> |
| 10 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | + * <p> |
| 12 | + * Unless required by applicable law or agreed to in writing, software |
| 13 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | + * See the License for the specific language governing permissions and |
| 16 | + * limitations under the License. |
| 17 | + */ |
| 18 | +package org.apache.hadoop.ozone.recon.chatbot; |
| 19 | + |
| 20 | +import org.apache.hadoop.hdds.annotation.InterfaceAudience; |
| 21 | +import org.apache.hadoop.hdds.annotation.InterfaceStability; |
| 22 | + |
| 23 | +/** |
| 24 | + * Configuration keys for Recon Chatbot service. |
| 25 | + */ |
| 26 | +@InterfaceAudience.Private |
| 27 | +@InterfaceStability.Unstable |
| 28 | +public final class ChatbotConfigKeys { |
| 29 | + |
| 30 | + private ChatbotConfigKeys() { |
| 31 | + // No instances |
| 32 | + } |
| 33 | + |
| 34 | + public static final String OZONE_RECON_CHATBOT_PREFIX = "ozone.recon.chatbot."; |
| 35 | + |
| 36 | + // ── Feature toggle ────────────────────────────────────────── |
| 37 | + public static final String OZONE_RECON_CHATBOT_ENABLED = OZONE_RECON_CHATBOT_PREFIX + "enabled"; |
| 38 | + public static final boolean OZONE_RECON_CHATBOT_ENABLED_DEFAULT = false; |
| 39 | + |
| 40 | + // ── Provider selection ────────────────────────────────────── |
| 41 | + /** Active default provider: openai, gemini, anthropic. */ |
| 42 | + public static final String OZONE_RECON_CHATBOT_PROVIDER = OZONE_RECON_CHATBOT_PREFIX + "provider"; |
| 43 | + public static final String OZONE_RECON_CHATBOT_PROVIDER_DEFAULT = "gemini"; |
| 44 | + |
| 45 | + // ── Default model ─────────────────────────────────────────── |
| 46 | + public static final String OZONE_RECON_CHATBOT_DEFAULT_MODEL = OZONE_RECON_CHATBOT_PREFIX + "default.model"; |
| 47 | + public static final String OZONE_RECON_CHATBOT_DEFAULT_MODEL_DEFAULT = "gemini-2.5-flash"; |
| 48 | + |
| 49 | + // ── HTTP timeout for provider calls ───────────────────────── |
| 50 | + public static final String OZONE_RECON_CHATBOT_TIMEOUT_MS = OZONE_RECON_CHATBOT_PREFIX + "timeout.ms"; |
| 51 | + public static final int OZONE_RECON_CHATBOT_TIMEOUT_MS_DEFAULT = 120000; |
| 52 | + |
| 53 | + // ── Per-provider API keys (resolved via JCEKS / CredentialHelper) ── |
| 54 | + public static final String OZONE_RECON_CHATBOT_OPENAI_API_KEY = OZONE_RECON_CHATBOT_PREFIX + "openai.api.key"; |
| 55 | + public static final String OZONE_RECON_CHATBOT_GEMINI_API_KEY = OZONE_RECON_CHATBOT_PREFIX + "gemini.api.key"; |
| 56 | + public static final String OZONE_RECON_CHATBOT_ANTHROPIC_API_KEY = OZONE_RECON_CHATBOT_PREFIX |
| 57 | + + "anthropic.api.key"; |
| 58 | + |
| 59 | + // ── Per-provider base URL overrides (optional) ────────────── |
| 60 | + public static final String OZONE_RECON_CHATBOT_OPENAI_BASE_URL = OZONE_RECON_CHATBOT_PREFIX + "openai.base.url"; |
| 61 | + public static final String OZONE_RECON_CHATBOT_OPENAI_BASE_URL_DEFAULT = "https://api.openai.com"; |
| 62 | + |
| 63 | + public static final String OZONE_RECON_CHATBOT_GEMINI_BASE_URL = OZONE_RECON_CHATBOT_PREFIX + "gemini.base.url"; |
| 64 | + public static final String OZONE_RECON_CHATBOT_GEMINI_BASE_URL_DEFAULT = "https://generativelanguage.googleapis.com"; |
| 65 | + |
| 66 | + public static final String OZONE_RECON_CHATBOT_ANTHROPIC_BASE_URL = OZONE_RECON_CHATBOT_PREFIX |
| 67 | + + "anthropic.base.url"; |
| 68 | + public static final String OZONE_RECON_CHATBOT_ANTHROPIC_BASE_URL_DEFAULT = "https://api.anthropic.com"; |
| 69 | + |
| 70 | + // ── Execution policy ──────────────────────────────────────── |
| 71 | + public static final String OZONE_RECON_CHATBOT_EXEC_MAX_RECORDS = OZONE_RECON_CHATBOT_PREFIX |
| 72 | + + "exec.max.records"; |
| 73 | + public static final int OZONE_RECON_CHATBOT_EXEC_MAX_RECORDS_DEFAULT = 1000; |
| 74 | + |
| 75 | + public static final String OZONE_RECON_CHATBOT_EXEC_MAX_PAGES = OZONE_RECON_CHATBOT_PREFIX + "exec.max.pages"; |
| 76 | + public static final int OZONE_RECON_CHATBOT_EXEC_MAX_PAGES_DEFAULT = 5; |
| 77 | + |
| 78 | + public static final String OZONE_RECON_CHATBOT_EXEC_PAGE_SIZE = OZONE_RECON_CHATBOT_PREFIX + "exec.page.size"; |
| 79 | + public static final int OZONE_RECON_CHATBOT_EXEC_PAGE_SIZE_DEFAULT = 200; |
| 80 | + |
| 81 | + public static final String OZONE_RECON_CHATBOT_EXEC_REQUIRE_SAFE_SCOPE = OZONE_RECON_CHATBOT_PREFIX |
| 82 | + + "exec.require.safe.scope"; |
| 83 | + public static final boolean OZONE_RECON_CHATBOT_EXEC_REQUIRE_SAFE_SCOPE_DEFAULT = true; |
| 84 | + |
| 85 | + // ── Agent configuration ───────────────────────────────────── |
| 86 | + public static final String OZONE_RECON_CHATBOT_MAX_TOOL_CALLS = OZONE_RECON_CHATBOT_PREFIX + "max.tool.calls"; |
| 87 | + public static final int OZONE_RECON_CHATBOT_MAX_TOOL_CALLS_DEFAULT = 5; |
| 88 | +} |
0 commit comments