Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To expose AI services to our system, we need an API to be exposed for the MediaHaven installation. When creating new Plugins having of the following https://mediahaven.atlassian.net/wiki/spaces/CS/pages/edit-v2/4438884395#Categories

...

Code Block
languagejson
{
  "Text": "Given me pictures of lamas",
  "Dimensions": 1536,
  "Config": {
    "TextModel" : "ada2"
  }
}

...

Array of float (vector) with size equal to dimensions. The vector MUST BE normalized. When the provided dimensions are 0, the embedding should be in the natural dimensions used by the embedding. If the embeddings cannot be provided in the requested dimensions, then a 400 HTTP error code should be returned.

Ex.

Code Block
languagejson
{
  "Embedding": [ 
    -0.006929283495992422,
    -0.005336422007530928,
    ... (omitted for spacing)
    -4.547132266452536e-05,
    -0.024047505110502243]
}

...

Code Block
languagejson
{
  "Config": {
    "TextModel" : "ada2"
  },
  "Metadata": {
    "RightsManagement": {
        "Permissions": {...},
        "RecordPhase": "Concept",
        "ExpiryDate": null,
        "ExpiryStatus": null,
        "Zone": {}
    },
    "Dimensions": 1536
  }
}

Expected headers

Code Block
x-api-key: <optional api key>

...

Array of float (vector) with size equal to dimensions. The vector MUST BE normalized. When the provided dimensions are 0, the embedding should be in the natural dimensions used by the embedding. If the embeddings cannot be provided in the requested dimensions, then a 400 HTTP error code should be returned.

Ex.

Code Block
languagejson
{
  "Embedding": [ 
    -0.006929283495992422,
    -0.005336422007530928,
    ... (omitted for spacing)
    -4.547132266452536e-05,
    -0.024047505110502243]
}

...