llm, add a finish for open-webui, fix config.yaml for Continue, possibly fix pull-models causing terminals to close when cancelled.
This commit is contained in:
@@ -325,7 +325,7 @@
|
|||||||
owner: "{{ user }}"
|
owner: "{{ user }}"
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
|
|
||||||
- name: Workstation | Linux | Software | LLMs | runit | open-webui | Script | File
|
- name: Workstation | Linux | Software | LLMs | runit | open-webui | Script | Run
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: /etc/sv/open-webui/run
|
dest: /etc/sv/open-webui/run
|
||||||
content: |
|
content: |
|
||||||
@@ -358,6 +358,25 @@
|
|||||||
ghcr.io/open-webui/open-webui:main
|
ghcr.io/open-webui/open-webui:main
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
|
|
||||||
|
- name: Workstation | Linux | Software | LLMs | runit | open-webui | Script | Finish
|
||||||
|
ansible.builtin.copy:
|
||||||
|
dest: /etc/sv/open-webui/finish
|
||||||
|
content: |
|
||||||
|
#!/bin/sh
|
||||||
|
exec 2>&1
|
||||||
|
# $1 is the exit code, $2 is the exit status byte (signal number if killed)
|
||||||
|
echo "Service finished with exit code: $1 and status: $2"
|
||||||
|
|
||||||
|
echo "Stopping..."
|
||||||
|
docker stop open-webui &&
|
||||||
|
echo "Container stopped" ||
|
||||||
|
echo "Container already stopped."
|
||||||
|
echo "Deleting..."
|
||||||
|
docker rm -f open-webui &&
|
||||||
|
echo "Container deleted" ||
|
||||||
|
echo "Container already deleted."
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
- name: Workstation | Linux | Software | LLMs | runit | open-webui | Script | Log
|
- name: Workstation | Linux | Software | LLMs | runit | open-webui | Script | Log
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: /etc/sv/open-webui/log/run
|
dest: /etc/sv/open-webui/log/run
|
||||||
@@ -459,11 +478,11 @@
|
|||||||
{% for llm in llm_installs %}
|
{% for llm in llm_installs %}
|
||||||
|
|
||||||
echo -e "\n\n Starting {{ llm.model }} \n\n"
|
echo -e "\n\n Starting {{ llm.model }} \n\n"
|
||||||
ollama pull {{ llm.model }} || {
|
ollama pull {{ llm.model }} ||
|
||||||
status=$?
|
status=$? &&
|
||||||
echo "ERROR: Pull failed with status $status, exiting."
|
echo "ERROR: Pull failed with status $status, exiting." &&
|
||||||
return $status
|
return $status
|
||||||
}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
echo "Done!!"
|
echo "Done!!"
|
||||||
}
|
}
|
||||||
@@ -574,20 +593,21 @@
|
|||||||
models:
|
models:
|
||||||
{% for llm in llm_installs %}
|
{% for llm in llm_installs %}
|
||||||
{% if llm.model in llm_models.stdout %}
|
{% if llm.model in llm_models.stdout %}
|
||||||
|
|
||||||
- name: {{ llm.provider }}
|
- name: {{ llm.provider }}
|
||||||
provider: ollama
|
provider: ollama
|
||||||
model: {{ llm.model }}
|
model: {{ llm.model }}
|
||||||
defaultCompletionOptions:
|
defaultCompletionOptions:
|
||||||
contextLength: {{ llm_context }}
|
contextLength: {{ llm_context }}
|
||||||
maxTokens: {{ llm_context }}
|
maxTokens: {{ llm_context / 4 }}
|
||||||
- name: {{ llm.provider }}-auto
|
#- name: {{ llm.provider }}_autocomplete
|
||||||
provider: ollama
|
# provider: ollama
|
||||||
model: {{ llm.model }}
|
# model: {{ llm.model }}
|
||||||
defaultCompletionOptions:
|
# defaultCompletionOptions:
|
||||||
contextLength: {{ llm_context }}
|
# contextLength: {{ llm_context }}
|
||||||
maxTokens: {{ llm_context }}
|
# maxTokens: {{ llm_context }}
|
||||||
roles:
|
# roles:
|
||||||
- autocomplete
|
# - autocomplete
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
|||||||
Reference in New Issue
Block a user