Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.keywordsai.co/llms.txt

Use this file to discover all available pages before exploring further.

You can group LLM logs together by using the group_identifier parameter in the request body. This is useful when you want to group logs together for a specific user or a specific task.

How to group logs?

You can group logs by using the group_identifier parameter in the request body.
from openai import OpenAI

client = OpenAI(
    base_url="https://api.keywordsai.co/api/",
    api_key="YOUR_KEYWORDSAI_API_KEY",
)

response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role":"user", "content":"Tell me a long story"}],
    extra_body={
        "group_identifier": "group_123"
    }
)

View grouped logs

Once you attach a group_identifier to a request, you can view those logs in Logs.
Group logs