Skip to content

Commit f1e9705

Browse files
committed
replace model name with deployment name for Azure OpenAI service
1 parent 329afbd commit f1e9705

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

src/aks-agent/HISTORY.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ To release a new version, please select a new version number (usually plus 1 to
1212
Pending
1313
+++++++
1414

15+
1.0.0b9
16+
+++++++
17+
* agent-init: replace model name with deployment name for Azure OpenAI service.
18+
* agent-init: remove importing holmesgpt to resolve the latency issue.
19+
1520
1.0.0b8
1621
+++++++
1722
* Error handling: dont raise traceback for init prompt and holmesgpt interaction.

src/aks-agent/azext_aks_agent/_consts.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,7 @@
2929
CONST_MCP_MIN_VERSION = "0.0.10"
3030
CONST_MCP_GITHUB_REPO = "Azure/aks-mcp"
3131
CONST_MCP_BINARY_DIR = "bin"
32+
33+
# Color constants for terminal output
34+
HELP_COLOR = "cyan" # same as AI_COLOR for now
35+
ERROR_COLOR = "red"

src/aks-agent/azext_aks_agent/agent/llm_providers/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
from typing import List, Tuple
77

8+
from azext_aks_agent._consts import ERROR_COLOR, HELP_COLOR
89
from rich.console import Console
910

1011
from .anthropic_provider import AnthropicProvider
@@ -47,7 +48,6 @@ def _get_provider_by_index(idx: int) -> LLMProvider:
4748
Return provider instance by numeric index (1-based).
4849
Raises ValueError if index is out of range.
4950
"""
50-
from holmes.utils.colors import HELP_COLOR
5151
if 1 <= idx <= len(_PROVIDER_CLASSES):
5252
console.print("You selected provider:", _PROVIDER_CLASSES[idx - 1]().readable_name, style=f"bold {HELP_COLOR}")
5353
return _PROVIDER_CLASSES[idx - 1]()
@@ -59,7 +59,6 @@ def prompt_provider_choice() -> LLMProvider:
5959
Show a numbered menu and return the chosen provider instance.
6060
Keeps prompting until a valid selection is made.
6161
"""
62-
from holmes.utils.colors import ERROR_COLOR, HELP_COLOR
6362
choices = _provider_choices_numbered()
6463
if not choices:
6564
raise ValueError("No providers are registered.")

src/aks-agent/azext_aks_agent/agent/llm_providers/base.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from typing import Any, Callable, Dict, Tuple
99
from urllib.parse import urlparse
1010

11+
from azext_aks_agent._consts import ERROR_COLOR, HELP_COLOR
1112
from rich.console import Console
1213

1314
console = Console()
@@ -85,9 +86,6 @@ def parameter_schema(self) -> Dict[str, Dict[str, Any]]:
8586

8687
def prompt_params(self):
8788
"""Prompt user for parameters using parameter_schema when available."""
88-
from holmes.interactive import SlashCommands
89-
from holmes.utils.colors import ERROR_COLOR, HELP_COLOR
90-
9189
schema = self.parameter_schema
9290
params = {}
9391
for param, meta in schema.items():
@@ -134,7 +132,7 @@ def prompt_params(self):
134132
params[param] = value
135133
break
136134
console.print(
137-
f"Invalid value for {param}. Please try again, or type '{SlashCommands.EXIT.command}' to exit.",
135+
f"Invalid value for {param}. Please try again, or type '/exit' to exit.",
138136
style=f"{ERROR_COLOR}")
139137

140138
return params

src/aks-agent/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from setuptools import find_packages, setup
1111

12-
VERSION = "1.0.0b8"
12+
VERSION = "1.0.0b9"
1313

1414
CLASSIFIERS = [
1515
"Development Status :: 4 - Beta",

0 commit comments

Comments
 (0)