This simple application is aiming to provide a demonstrator of the WildFly AI Feature Pack.
You will need to have either docker or podman installed.
To start Ollama and select the proper model (aka `llama3.1:8b) executethe following commands:
podman run -d --rm --name ollama --replace --pull=always -p 11434:11434 -v ollama:/root/.ollama --stop-signal=SIGKILL docker.io/ollama/ollama
podman exec -it ollama ollama run llama3.1:8b
To quit the Ollama prompt, type /bye.
Once you have finished you can stop Ollama using:
podman stop ollama
Provisioning using the WildFly Maven Plugin
You need to include the WildFly AI feature-pack and layers in the Maven Plugin configuration. This looks like:
...
<feature-packs>
<feature-pack>
<location>org.wildfly:wildfly-galleon-pack:35.0.0.Final</location>
</feature-pack>
<feature-pack>
<location>org.wildfly:wildfly-ai-galleon-pack:1.0.0-SNAPSHOT</location>
</feature-pack>
</feature-packs>
<layers>
<!-- layers may be used to customize the server to provision-->
<layer>cloud-server</layer>
<layer>ollama-chat-model</layer>
<layer>default-embedding-content-retriever</layer>
<!-- providing the following layers -->
<!--
<layer>in-memory-embedding-model-all-minilm-l6-v2</layer>
<layer>in-memory-embedding-store</layer>
-->
<!-- Exisiting layers thart can be used -->
<!--
<layer>ollama-embedding-model</layer>
<layer>openai-chat-model</layer>
<layer>mistral-ai-chat-model</layer>
<layer>weaviate-embedding-store</layer>
<layer>web-search-engines</layer>
-->
</layers>
...
Provisioning using the WildFly Maven Plugin and Glow
This makes the provisioning seamless and the XML simpler:
...
<discoverProvisioningInfo>
<spaces>
<space>incubating</space>
</spaces>
</discoverProvisioningInfo>
...
You build using Apache Maven with the following command:
mvn clean install
You can now start the server:
./target/server/bin/standalone.sh
You can interact with the application using:
- some simple REST endpoints defined on the service page
- A simple webchat interface for RAG using WildFly documentation. You can ask question that the RAG will try to answer like: "How do you configure a connection factory to a remote Artemis server ?".
You build using Apache Maven with the following command:
mvn clean install -Popentelemetry
You can now start the otle collector:
./opentelemetry.sh
You can now start the server:
./target/server/bin/standalone.sh
You can interact with the application using:
- some simple REST endpoints defined on the service page
- A simple webchat interface for RAG using WildFly documentation. You can ask question that the RAG will try to answer like: "How do you configure a connection factory to a remote Artemis server ?".