Skip to content

Commit

Permalink
revert az aks copilot (Azure#6773)
Browse files Browse the repository at this point in the history
  • Loading branch information
sulixu authored Sep 19, 2023
1 parent af7389b commit 38e69bc
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 464 deletions.
4 changes: 4 additions & 0 deletions src/aks-preview/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ To release a new version, please select a new version number (usually plus 1 to
Pending
+++++++

0.5.159
+++++++
* Revert `az aks copilot` Command

0.5.158
+++++++
* Add `enable-egress-gateway` and `disable-egress-gateway` to the `az aks mesh` command.
Expand Down
17 changes: 0 additions & 17 deletions src/aks-preview/azext_aks_preview/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -2666,20 +2666,3 @@
- name: Disable an egress gateway.
text: az aks mesh disable-egress-gateway --resource-group MyResourceGroup --name MyManagedCluster
"""

helps['aks copilot'] = """
type: command
short-summary: Start a chat with the Azure Kubernetes Service expert. API keys for OpenAI or Azure are required.
long-summary: |-
This command initiates a chat assistant with expertise in Azure Kubernetes Service, offering guidance on troubleshooting issues using az commands.
You have two options,
OpenAI option,
sign in to https://www.openai.com/, navigate to the API key section in your account dashboard (https://platform.openai.com/signup), follow the instructions to create a new API key, and choose models from https://platform.openai.com/docs/models/.
export OPENAI_API_KEY=xxx, export OPENAI_API_MODEL=gpt-3.5-turbo
Azure OpenAI option,
after creating a new Cognitive Services resource (https://azure.microsoft.com/en-us/services/cognitive-services/), you can find the OPENAI_API_KEY and OPENAI_API_BASE in the "Keys and Endpoint" section of the resource's management page on the Azure portal (https://portal.azure.com/). OPENAI_API_DEPLOYMENT can be found in the "Model deployments" section, and OPENAI_API_TYPE should be "azure" for this option.
export OPENAI_API_KEY=xxx, export OPENAI_API_BASE=https://xxxinstance.openai.azure.com/, export OPENAI_API_DEPLOYMENT=gpt-4-32k-0314, export OPENAI_API_TYPE=azure
examples:
- name: How to create a AKS private cluster.
text: az aks copilot -p "How to create a private cluster"
"""
344 changes: 0 additions & 344 deletions src/aks-preview/azext_aks_preview/_openai_wrapper.py

This file was deleted.

5 changes: 0 additions & 5 deletions src/aks-preview/azext_aks_preview/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@
validate_nodepool_tags,
validate_nodes_count,
validate_os_sku,
validate_prompt_input,
validate_pod_identity_pod_labels,
validate_pod_identity_resource_name,
validate_pod_identity_resource_namespace,
Expand Down Expand Up @@ -930,10 +929,6 @@ def load_arguments(self, _):
c.argument('root_cert_object_name')
c.argument('cert_chain_object_name')

with self.argument_context('aks copilot') as c:
c.argument('prompt', options_list=['--prompt', '-p'], validator=validate_prompt_input,
help='The question you want to ask, e.g: How to create a AKS cluster')


def _get_default_install_location(exe_name):
system = platform.system()
Expand Down
Loading

0 comments on commit 38e69bc

Please sign in to comment.