---
title: "Discussion on \"APEX in the AI era\" | Hashnode"
description: "Discussion on \"APEX in the AI era\". Using your local LLMs with the APEX Generative AI Services"
url: "https://hashnode.com/posts/apex-in-the-ai-era/6675441af23a55ec76b77357"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [APEX in the AI era](https://blog.apexapplab.dev/apex-in-the-ai-era?utm_source=hashnode&utm_medium=feed)

Using your local LLMs with the APEX Generative AI Services

Jun 21, 2024 · 10 min read · blog.apexapplab.dev  
Updated Jul 4, 2025  
Read the article

-   [#orclapex](https://hashnode.com/tag/orclapex)
-   [#llm](https://hashnode.com/tag/llm)
-   [#ai](https://hashnode.com/tag/ai)
-   [#ollama](https://hashnode.com/tag/ollama)
-   [#oracle](https://hashnode.com/tag/oracle)

## Written by

[Plamen Mushkov](https://hashnode.com/@plamen9)

@plamen9 · London, UK

  
[View profile](https://hashnode.com/@plamen9)

Building Oracle APEX applications. Writing about tech.

Creating apps built with ❤️ using Oracle APEX. PL/SQL dev. Exploring the AI and ML world. Keen on front-end, visual arts and new technologies. Love travel, sports, photography.

## Responses 3

Markdown supported · ⌘↵ to post

[Mohamed Sameer](https://hashnode.com/@samfaj1255)

[Sep 6, 2025](https://hashnode.com/posts/apex-in-the-ai-era/6675441af23a55ec76b77357/comment/68bc54164ff9a760c060216b)

I get error: ORA-00001: unique constraint (APEX\_240200.WWV\_REMOTE\_SRVR\_AI\_BLD\_UK) violated

do you have any idea? how to resolve

[Ravi Kasibhatla](https://hashnode.com/@RKasibhatla)

[Jul 22, 2024](https://hashnode.com/posts/apex-in-the-ai-era/6675441af23a55ec76b77357/comment/669e9ac0ec6e9a4ece35b371)

Hi Plamen,

Good Day and congrats for such an enriching blog.

Everything worked as your blog says (at least the very first time) and then onwards ngrok started giving troubles; may be because of the free account they might limit the traffic etc., but no issues.

I have created an Oracle Linux instance in the OCI Tenancy (because my APEX app is there) and completed the OLLAMA setup successfully. Checked that the ollama service is getting accessed through internet; checked that I could access the OLLMA service over internet using postman as well as curl ang got results correctly.

However, when tried to use the same URL (with the bare public IP that worked with cURL and Postman) APEX errored out saying taht the requested URL is prohibited.

I created an API Gateway in OCI and trying to pass through it to reach the OLLAM service, however the AP Gateway is throwing error.

If you are interested in probing and tweaking in to this architecture (accessing OLLAMA securely via OCI API Gateway) I am open to mutual colaboration.

Regards

[Ravi Kasibhatla](https://hashnode.com/@RKasibhatla)

[Jul 23, 2024](https://hashnode.com/posts/apex-in-the-ai-era/6675441af23a55ec76b77357/comment/669e9ac0ec6e9a4ece35b371#reply-669f217bde9885c8b466eb7a)

Hi There. Don't bother...I got it working..!! Thanks for your post though, I got the idea of using open source local LLMs with APEX using my own OCI Instance and OCI API Gateways.

Regards

[Plamen Mushkov](https://hashnode.com/@plamen9)

[Jul 23, 2024](https://hashnode.com/posts/apex-in-the-ai-era/6675441af23a55ec76b77357/comment/669e9ac0ec6e9a4ece35b371#reply-669fbf4bbf337aec57533342)

Hi Ravi, I'm glad it worked for you. As you have discovered, Ngrok's free accounts have some limitations - they use the default URLs which are too long. It also generates a new URL every time you re-start the service, so you need to re-configure the services using it.

But since you have Ollama on OCI and Ngrok is out of the equation, it's all good. Hope it performs well on the OCI and the cost is not too high.

[Ravi Kasibhatla](https://hashnode.com/@RKasibhatla)

[Jul 23, 2024](https://hashnode.com/posts/apex-in-the-ai-era/6675441af23a55ec76b77357/comment/669e9ac0ec6e9a4ece35b371#reply-669fc651c769585ae0e46bbe)

Hi there

Thanks for your reply. For just a lab environment its doing "ok-ishh".

The VM instance I used is the smallest one (1 CPU + 16GB RAM) in OCI. After trying to pull more than one model with ollama, I found out that even the default disk size is also not enough and I had to increase that. :-)

During my testing phase there were some hiccups because I monitored that the ollama was thriving for both CPU and RAM and meanwhile the OCI API Gateway gets timed out.

So, for a real world scenario, one must go with a GPU based instance, a baremetal instance or at least an instance with considerable amout of resources so that the things work consistently.

My next adventure would be adding the RAG for this architecture...I might post the whole thing once I get things working.

Regards.

Ravi

[VP](https://hashnode.com/@vandanapatel12)

[Jun 26, 2024](https://hashnode.com/posts/apex-in-the-ai-era/6675441af23a55ec76b77357/comment/667bc1c0fc96802cf9a0dd4e)

Hello, This is an awesome post. I tried it but stuck in the Ngrok part. The Ngrok base URL is not running in Postman. getting 403 - forbidden error. Can we run the Base URL of Ngrok in POSTMAN? In the APEX part, I configured it and then created a button to invoke the Chatbox. Invoking is working fine but when we enter a Prompt then it gives this error "Generative Al Service with given ID or static ID not found."

[Plamen Mushkov](https://hashnode.com/@plamen9)

[Jun 28, 2024](https://hashnode.com/posts/apex-in-the-ai-era/6675441af23a55ec76b77357/comment/667bc1c0fc96802cf9a0dd4e#reply-667e8e9294c3a42bf4cd2200)

The Ngrok setup first:

Try adding the `host_header` when starting Ngrok: `ngrok http [127.0.0.1](http://127.0.0.1:11434/) --host-header '127.0.0.1:11434'`

After starting the tunnel, open the Ngrok URL in the browser and when displayed a default page, click on "**Visit Site**" button. It only need to be done once.

If the above doesn't work, you can try to run it using a **.yml** file - here is the documentation ([ngrok.com/docs/guides/site-to-site-apis-mtls](https://ngrok.com/docs/guides/site-to-site-apis-mtls/#update-ngrokyml)).

The file will look like this:

```
version: 2
authtoken: YOUR-AUTH-TOKEN
tunnels:
  ollama:
    proto: http
    addr: http://127.0.0.1:11434/
    host_header: 127.0.0.1:11434
```

Pay attention to the `host_header` part - it should fix your 403 error.

As to Ollama, run `ollama list` in the Terminal. You will get a list of your models. You can get the Model name from there and use it in your APEX AI Services configuration. This should resolve your second problem. When using the newly configured AI Service for the AI Assistant component for example, it is a drop down menu, you can't enter a wrong name.
