GET
/
context
/
{user_id}
/
ask
curl --request GET \
  --url https://api.onfabric.io/api/v1/context/{user_id}/ask
{
  "answer": "<string>",
  "context": [
    {
      "id": "<string>",
      "text": "<string>",
      "topics": [
        "<string>"
      ],
      "entities": [
        "<string>"
      ],
      "traits": {
        "sex": {
          "value": "MALE",
          "confidence": "NONE"
        },
        "country": {
          "value": "ABW",
          "confidence": "NONE"
        },
        "affluence": {
          "value": "LOW",
          "confidence": "NONE"
        },
        "political_affiliation": {
          "value": "LEFT",
          "confidence": "NONE"
        },
        "age": {
          "value": "0-18+",
          "confidence": "NONE"
        }
      },
      "cohesion": 123,
      "count": 123,
      "start_time": "2023-11-07T05:31:56Z",
      "end_time": "2023-11-07T05:31:56Z",
      "score": 123
    }
  ]
}

Headers

api-key
string

The api key generated from the Fabric developer portal

Path Parameters

user_id
string
required

The id of the user

Query Parameters

question
string
required

The question you have for the user

language_model
enum<string>

A language model to use for NLG

Available options:
o1-preview,
o1-mini,
gpt-4o,
gpt-4o-mini
from_date
string

Start date to filter events from

to_date
string

End date to filter events to

Response

200
application/json
Successful Response
answer
string
required
context
object[]
required