-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AAP-24704: Refactor ModelMeshClient environment variable names (#1087)
- Loading branch information
Showing
16 changed files
with
148 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -776,7 +776,7 @@ def test_full_payload(self): | |
"suggestionId": str(uuid.uuid4()), | ||
} | ||
response_data = { | ||
"model_id": settings.ANSIBLE_AI_MODEL_NAME, | ||
"model_id": settings.ANSIBLE_AI_MODEL_MESH_MODEL_ID, | ||
"predictions": [" ansible.builtin.apt:\n name: apache2"], | ||
} | ||
self.client.force_authenticate(user=self.user) | ||
|
@@ -798,7 +798,7 @@ def test_multi_task_prompt_commercial(self): | |
"suggestionId": str(uuid.uuid4()), | ||
} | ||
response_data = { | ||
"model_id": settings.ANSIBLE_AI_MODEL_NAME, | ||
"model_id": settings.ANSIBLE_AI_MODEL_MESH_MODEL_ID, | ||
"predictions": [ | ||
"- name: Install Apache\n ansible.builtin.apt:\n name: apache2\n state: latest\n- name: start Apache\n ansible.builtin.service:\n name: apache2\n state: started\n enabled: yes\n" # noqa: E501 | ||
], | ||
|
@@ -842,7 +842,7 @@ def test_multi_task_prompt_commercial_with_pii(self): | |
"suggestionId": str(uuid.uuid4()), | ||
} | ||
response_data = { | ||
"model_id": settings.ANSIBLE_AI_MODEL_NAME, | ||
"model_id": settings.ANSIBLE_AI_MODEL_MESH_MODEL_ID, | ||
"predictions": [ | ||
"- name: Install Apache\n ansible.builtin.apt:\n name: apache2\n state: latest\n- name: say hello [email protected]\n ansible.builtin.debug:\n msg: Hello there [email protected]\n" # noqa: E501 | ||
], | ||
|
@@ -879,7 +879,7 @@ def test_rate_limit(self): | |
"suggestionId": str(uuid.uuid4()), | ||
} | ||
response_data = { | ||
"model_id": settings.ANSIBLE_AI_MODEL_NAME, | ||
"model_id": settings.ANSIBLE_AI_MODEL_MESH_MODEL_ID, | ||
"predictions": [" ansible.builtin.apt:\n name: apache2"], | ||
} | ||
self.client.force_authenticate(user=self.user) | ||
|
@@ -903,7 +903,7 @@ def test_missing_prompt(self): | |
"suggestionId": str(uuid.uuid4()), | ||
} | ||
response_data = { | ||
"model_id": settings.ANSIBLE_AI_MODEL_NAME, | ||
"model_id": settings.ANSIBLE_AI_MODEL_MESH_MODEL_ID, | ||
"predictions": [" ansible.builtin.apt:\n name: apache2"], | ||
} | ||
self.client.force_authenticate(user=self.user) | ||
|
@@ -924,7 +924,7 @@ def test_authentication_error(self): | |
"suggestionId": str(uuid.uuid4()), | ||
} | ||
response_data = { | ||
"model_id": settings.ANSIBLE_AI_MODEL_NAME, | ||
"model_id": settings.ANSIBLE_AI_MODEL_MESH_MODEL_ID, | ||
"predictions": [" ansible.builtin.apt:\n name: apache2"], | ||
} | ||
# self.client.force_authenticate(user=self.user) | ||
|
@@ -953,7 +953,7 @@ def test_completions_preprocessing_error(self): | |
"suggestionId": str(uuid.uuid4()), | ||
} | ||
response_data = { | ||
"model_id": settings.ANSIBLE_AI_MODEL_NAME, | ||
"model_id": settings.ANSIBLE_AI_MODEL_MESH_MODEL_ID, | ||
"predictions": [" ansible.builtin.apt:\n name: apache2"], | ||
} | ||
self.client.force_authenticate(user=self.user) | ||
|
@@ -979,7 +979,7 @@ def test_completions_preprocessing_error_without_name_prompt(self): | |
"suggestionId": str(uuid.uuid4()), | ||
} | ||
response_data = { | ||
"model_id": settings.ANSIBLE_AI_MODEL_NAME, | ||
"model_id": settings.ANSIBLE_AI_MODEL_MESH_MODEL_ID, | ||
"predictions": [" ansible.builtin.apt:\n name: apache2"], | ||
} | ||
self.client.force_authenticate(user=self.user) | ||
|
@@ -1003,7 +1003,7 @@ def test_full_payload_without_ARI(self): | |
"suggestionId": str(uuid.uuid4()), | ||
} | ||
response_data = { | ||
"model_id": settings.ANSIBLE_AI_MODEL_NAME, | ||
"model_id": settings.ANSIBLE_AI_MODEL_MESH_MODEL_ID, | ||
"predictions": [" ansible.builtin.apt:\n name: apache2"], | ||
} | ||
self.client.force_authenticate(user=self.user) | ||
|
@@ -1028,7 +1028,7 @@ def test_full_payload_with_recommendation_with_broken_last_line(self): | |
} | ||
# quotation in the last line is not closed, but the truncate function can handle this. | ||
response_data = { | ||
"model_id": settings.ANSIBLE_AI_MODEL_NAME, | ||
"model_id": settings.ANSIBLE_AI_MODEL_MESH_MODEL_ID, | ||
"predictions": [ | ||
' ansible.builtin.apt:\n name: apache2\n register: "test' | ||
], | ||
|
@@ -1055,7 +1055,7 @@ def test_completions_postprocessing_error_for_invalid_yaml(self): | |
} | ||
# this prediction has indentation problem with the prompt above | ||
response_data = { | ||
"model_id": settings.ANSIBLE_AI_MODEL_NAME, | ||
"model_id": settings.ANSIBLE_AI_MODEL_MESH_MODEL_ID, | ||
"predictions": [" ansible.builtin.apt:\n garbage name: apache2"], | ||
} | ||
self.client.force_authenticate(user=self.user) | ||
|
@@ -1126,7 +1126,7 @@ def test_payload_with_ansible_lint_without_commercial(self): | |
"suggestionId": str(uuid.uuid4()), | ||
} | ||
response_data = { | ||
"model_id": settings.ANSIBLE_AI_MODEL_NAME, | ||
"model_id": settings.ANSIBLE_AI_MODEL_MESH_MODEL_ID, | ||
"predictions": [" ansible.builtin.apt:\n name: apache2"], | ||
} | ||
self.client.force_authenticate(user=self.user) | ||
|
@@ -1149,7 +1149,7 @@ def test_full_payload_without_ansible_lint_without_commercial(self): | |
"suggestionId": str(uuid.uuid4()), | ||
} | ||
response_data = { | ||
"model_id": settings.ANSIBLE_AI_MODEL_NAME, | ||
"model_id": settings.ANSIBLE_AI_MODEL_MESH_MODEL_ID, | ||
"predictions": [" ansible.builtin.apt:\n name: apache2"], | ||
} | ||
self.client.force_authenticate(user=self.user) | ||
|
@@ -1178,7 +1178,7 @@ def test_full_payload_without_ansible_lint_with_commercial_user(self): | |
"suggestionId": str(uuid.uuid4()), | ||
} | ||
response_data = { | ||
"model_id": settings.ANSIBLE_AI_MODEL_NAME, | ||
"model_id": settings.ANSIBLE_AI_MODEL_MESH_MODEL_ID, | ||
"predictions": [" ansible.builtin.apt:\n name: apache2"], | ||
} | ||
self.client.force_authenticate(user=self.user) | ||
|
@@ -1343,7 +1343,7 @@ def test_completions_pii_clean_up(self): | |
"suggestionId": str(uuid.uuid4()), | ||
} | ||
response_data = { | ||
"model_id": settings.ANSIBLE_AI_MODEL_NAME, | ||
"model_id": settings.ANSIBLE_AI_MODEL_MESH_MODEL_ID, | ||
"predictions": [""], | ||
} | ||
self.client.force_authenticate(user=self.user) | ||
|
@@ -1364,7 +1364,7 @@ def test_full_completion_post_response(self): | |
"suggestionId": str(uuid.uuid4()), | ||
} | ||
response_data = { | ||
"model_id": settings.ANSIBLE_AI_MODEL_NAME, | ||
"model_id": settings.ANSIBLE_AI_MODEL_MESH_MODEL_ID, | ||
"predictions": [" ansible.builtin.apt:\n name: apache2"], | ||
} | ||
self.client.force_authenticate(user=self.user) | ||
|
Oops, something went wrong.