|
43 | 43 | You must specify a 'chatbot_token' in your Secret.
|
44 | 44 | when: not _chatbot_config_resource["resources"][0]["data"].chatbot_token
|
45 | 45 |
|
46 |
| -- name: Set Chatbot Configuration |
| 46 | +- name: Set Chatbot Token |
47 | 47 | ansible.builtin.set_fact:
|
48 |
| - chatbot_config: '{{ _chatbot_config_resource }}' |
| 48 | + chatbot_token: '{{ _chatbot_config_resource["resources"][0]["data"].chatbot_token | b64decode }}' |
49 | 49 | no_log: "{{ no_log }}"
|
50 | 50 |
|
51 |
| -- name: Set LLM provider type if it is defined in the config |
| 51 | +- name: Set AAP Gateway URL |
52 | 52 | ansible.builtin.set_fact:
|
53 |
| - chatbot_llm_provider_type: '{{ _chatbot_config_resource["resources"][0]["data"].chatbot_llm_provider_type | b64decode }}' |
| 53 | + _aap_gateway_url: '{{ _chatbot_config_resource["resources"][0]["data"].aap_gateway_url | b64decode }}' |
54 | 54 | no_log: "{{ no_log }}"
|
55 |
| - when: _chatbot_config_resource["resources"][0]["data"].chatbot_llm_provider_type is defined |
56 |
| - |
57 |
| -- name: Validate watsonx.ai project ID if LLM provider type is set to "watsonx" |
58 |
| - ansible.builtin.fail: |
59 |
| - msg: | |
60 |
| - You must specify a 'chatbot_llm_provider_project_id' in your Secret when 'chatbot_llm_provider_type' is set to 'watsonx' |
61 | 55 | when:
|
62 |
| - - chatbot_llm_provider_type is defined |
63 |
| - - chatbot_llm_provider_type == "watsonx" |
64 |
| - - not _chatbot_config_resource["resources"][0]["data"].chatbot_llm_provider_project_id is defined |
65 |
| - |
66 |
| -- name: Set watsonx.ai project ID if it is defined in the config |
67 |
| - ansible.builtin.set_fact: |
68 |
| - chatbot_llm_provider_project_id: '{{ _chatbot_config_resource["resources"][0]["data"].chatbot_llm_provider_project_id | b64decode }}' |
69 |
| - no_log: "{{ no_log }}" |
70 |
| - when: _chatbot_config_resource["resources"][0]["data"].chatbot_llm_provider_project_id is defined |
| 56 | + - _chatbot_config_resource["resources"][0]["data"].aap_gateway_url is defined |
| 57 | + - _chatbot_config_resource["resources"][0]["data"].aap_gateway_url | length |
71 | 58 |
|
72 |
| -- name: Set context window size if it is defined in the config |
| 59 | +- name: Set AAP Controller URL |
73 | 60 | ansible.builtin.set_fact:
|
74 |
| - chatbot_context_window_size: '{{ _chatbot_config_resource["resources"][0]["data"].chatbot_context_window_size | b64decode | int }}' |
75 |
| - no_log: "{{ no_log }}" |
76 |
| - when: _chatbot_config_resource["resources"][0]["data"].chatbot_context_window_size is defined |
77 |
| - |
78 |
| -- name: Set LLM temperature parameter override if it is defined in the config |
79 |
| - ansible.builtin.set_fact: |
80 |
| - chatbot_temperature_override: '{{ _chatbot_config_resource["resources"][0]["data"].chatbot_temperature_override | b64decode }}' |
81 |
| - no_log: "{{ no_log }}" |
82 |
| - when: _chatbot_config_resource["resources"][0]["data"].chatbot_temperature_override is defined |
83 |
| - |
84 |
| -- name: Set Azure AI deployment name if it is defined in the config |
85 |
| - ansible.builtin.set_fact: |
86 |
| - chatbot_azure_deployment_name: '{{ _chatbot_config_resource["resources"][0]["data"].chatbot_azure_deployment_name | b64decode }}' |
| 61 | + _aap_controller_url: '{{ _chatbot_config_resource["resources"][0]["data"].aap_controller_url | b64decode }}' |
87 | 62 | no_log: "{{ no_log }}"
|
88 | 63 | when:
|
89 |
| - - chatbot_llm_provider_type is defined |
90 |
| - - chatbot_llm_provider_type is search("azure_openai") |
91 |
| - - _chatbot_config_resource["resources"][0]["data"].chatbot_azure_deployment_name is defined |
| 64 | + - _chatbot_config_resource["resources"][0]["data"].aap_controller_url is defined |
| 65 | + - _chatbot_config_resource["resources"][0]["data"].aap_controller_url | length |
92 | 66 |
|
93 |
| -- name: Set Azure AI API version if it is defined in the config |
94 |
| - ansible.builtin.set_fact: |
95 |
| - chatbot_azure_api_version: '{{ _chatbot_config_resource["resources"][0]["data"].chatbot_azure_api_version | b64decode }}' |
96 |
| - no_log: "{{ no_log }}" |
97 |
| - when: |
98 |
| - - chatbot_llm_provider_type is defined |
99 |
| - - chatbot_llm_provider_type is search("azure_openai") |
100 |
| - - _chatbot_config_resource["resources"][0]["data"].chatbot_azure_api_version is defined |
101 |
| - |
102 |
| -- name: Set Chatbot Include Fake LLMs to false if it is not defined in the config |
103 |
| - ansible.builtin.set_fact: |
104 |
| - chatbot_include_fake_llms: false |
105 |
| - no_log: "{{ no_log }}" |
106 |
| - when: not _chatbot_config_resource["resources"][0]["data"].chatbot_include_fake_llms is defined |
107 |
| - |
108 |
| -- name: Set Chatbot Include Fake LLMs if it is defined in the config |
109 |
| - ansible.builtin.set_fact: |
110 |
| - chatbot_include_fake_llms: '{{ _chatbot_config_resource["resources"][0]["data"].chatbot_include_fake_llms | default(false) | b64decode }}' |
111 |
| - no_log: "{{ no_log }}" |
112 |
| - when: _chatbot_config_resource["resources"][0]["data"].chatbot_include_fake_llms is defined |
113 |
| - |
114 |
| -- name: Set Chatbot Fake Streaming Chunks |
115 |
| - ansible.builtin.set_fact: |
116 |
| - chatbot_fake_streaming_chunks: '{{ _chatbot_config_resource["resources"][0]["data"].chatbot_fake_streaming_chunks | b64decode }}' |
117 |
| - no_log: "{{ no_log }}" |
118 |
| - when: _chatbot_config_resource["resources"][0]["data"].chatbot_fake_streaming_chunks is defined |
119 |
| - |
120 |
| -- name: Set Chatbot Fake Streaming Sleep |
| 67 | +- name: Set Chatbot Configuration |
121 | 68 | ansible.builtin.set_fact:
|
122 |
| - chatbot_fake_streaming_sleep: '{{ _chatbot_config_resource["resources"][0]["data"].chatbot_fake_streaming_sleep | b64decode }}' |
| 69 | + chatbot_config: '{{ _chatbot_config_resource }}' |
123 | 70 | no_log: "{{ no_log }}"
|
124 |
| - when: _chatbot_config_resource["resources"][0]["data"].chatbot_fake_streaming_sleep is defined |
0 commit comments