Skip to content

Integrate with Groq models

You can integrate F5 AI Security. We provide a Python script to help with the process, which includes the following variables:

  • BASE_URL: The URL of the AI Security deployment. Depends on whether your deployment uses AI Security SaaS or your own on-premises system.
  • API_KEY: You can get your API_KEY, also known as an authorization token.
  • PROVIDER_API_KEY: Provided by Groq. Consult their documentation for instructions.

Substitute actual values in the following Python script, and run it:

python
from calypsoai import CalypsoAI

cai = CalypsoAI(url={BASE_URL}, token={API_KEY})

provider = cai.providers.create(
    name="Example-Groq",
    systemProvider="groq",
    secrets={"apiKey": {"name": "Groq API Key", "value": "{PROVIDER_API_KEY}"}},
    inputs={
        "model": "llama-3.1-8b-instant",
        "maxTokens": 1024,
        "temperature": 1,
        "topP": 1,
    },
)

Updated at: