Skip to content

Lab 3: Initial Setup

This is where the HR Document Assistant scenario from the workshop introduction starts. The HR ChatBot talks directly to the private LLM, which knows compensation data, disciplinary records, medical leave history and termination details. In this lab you put FortiAIGate in front of it: the ChatBot gets its own credential and every request goes through the gateway.

🎯 Lab Objectives

In this lab, you will:

  • Create the HR-Assist project in your workspace.
  • Create a service virtual key for the ChatBot.
  • Point the ChatBot to the FortiAIGate endpoint.
  • Verify the first request in the Traffic Log.

1. Project and Virtual Key

Step 1 – Create the HR-Assist project

A project groups the keys of one application and adds its own model restrictions and budget.

Navigate to: Projects > Create Project.

Configure:

  • Name: HR-Assist
  • Description: HR Document Assistant ChatBot
  • Model Access: llama3.2:3b
  • Budget: Unlimited budget
  • Policies: leave empty

Click Create Project, then reopen the project and verify the values.

Step 2 – Create the ChatBot virtual key

The virtual key is the credential the ChatBot uses to call FortiAIGate. The real model credential never leaves the gateway.

Navigate to: Virtual Keys > Create Virtual Key.

Configure:

  • Project: HR-Assist
  • Key Type: Service
  • Name: hr-chatbot-key
  • Model Access: Grant model access → llama3.2:3b
  • Bound credentials: keep the workspace default for each provider
  • Budget, RPM, TPM, Expiry: leave empty

Click Create Virtual Key.

Copy the secret now. It is shown only once.

Lost secret

If you lose the secret, use Rotate on the key to get a new one. Rotation has no grace period: update the ChatBot right away.


2. ChatBot Connection

Step 3 – Point the ChatBot to FortiAIGate

Open the ChatBot and go to the Configuration panel on the left. The ChatBot may come with default values, such as a shared key or a direct connection to the model. Clear them and enter your own, so that every request goes through FortiAIGate with your key:

Setting Value
LLM Endpoint https://Your_FortiAIGate_FQDN/ai/openai/v1
API Key The virtual key you copied
Model llama3.2-3b
Streaming Off

Click Save.

The endpoint ends in /ai/openai/v1. The ChatBot uses the OpenAI SDK, which adds /chat/completions by itself.

Step 4 – Send the first request

In the ChatBot, send:

Prompt:

Hello, are you working?

Navigate to: Logs > Traffic Log in your Workspace portal and open the request.

Expected result:

  • The ChatBot shows an answer.
  • The Traffic Log shows the request with your workspace, the hr-chatbot-key key and the model.

No entry in the Traffic Log

If the request is not in the Traffic Log, the ChatBot is not going through FortiAIGate and none of the following controls will apply. Check the endpoint and the key.

Model processing behavior

llama3.2:3b is a small model shared by the whole class. An answer can take several seconds. While a request is in progress, nothing appears in the logs: wait until it completes before you refresh the Traffic Log.


🏁 Conclusion

In this lab, you:

  • Created the HR-Assist project.
  • Created the service virtual key hr-chatbot-key.
  • Routed the ChatBot through FortiAIGate.
  • Verified the first request in the Traffic Log.

No policy is attached to the key yet: the LLM is still unprotected. In the next lab you will see why that is a problem.