Versions Compared

Key

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

...

The contract of this API is as follows (anything can be added before the path):

GET /config-rules

Gives It gives the possible configuration parameters for this connector

...

Expected parameters:

Text as json JSON body in Textproperty and Config based on config rules

...

Expected parameters:

Record as json JSON body in Metadata property and Config based on config rules

...

Code Block
languagejson
{
  "MetadataConfig": {
    "RightsManagementTextModel": {
        "Permissions": {
            "Export": [
                "058b5713-a7d6-45fe-81fc-bcb8b1925fbf",
                "dd100b7a-efd0-44e3-8816-0905572421da",
"ada2"
  },
  "Metadata": {
               "da100b7a-efd0-44e3-8816-0905572421da"
            ],
            "Write": [
       "RightsManagement": {
        "058b5713-a7d6-45fe-81fc-bcb8b1925fbf",
                "dd100b7a-efd0-44e3-8816-0905572421da",
                "da100b7a-efd0-44e3-8816-0905572421da"
            ],
            "Read": [
                "058b5713-a7d6-45fe-81fc-bcb8b1925fbf",
                "dd100b7a-efd0-44e3-8816-0905572421da",
                "330060ae-548c-474f-a863-9673fdf99458",
                "de100b7a-efd0-44e3-8816-0905572421da",
                "df100b7a-efd0-44e3-8816-0905572421da",
                "da100b7a-efd0-44e3-8816-0905572421da"
            ]
        Permissions": {...},
        "RecordPhase": "Concept",
        "ExpiryDate": null,
        "ExpiryStatus": null,
        "Zone": {}
  
 }   },
  "Config": {
    "TextModel" : "ada2"
  }
}

Expected headers:

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

...

Ex.

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

POST /describe
POST /generative-metadata/description

Expected parameters:

Record as json JSON body in Metadata property and Config based on config rules

...

Code Block
languagejson
{
  "MetadataConfig": {
    "RightsManagement": {
        "Permissions": {
            "Export": [
                "058b5713-a7d6-45fe-81fc-bcb8b1925fbf",
                "dd100b7a-efd0-44e3-8816-0905572421da",
                "da100b7a-efd0-44e3-8816-0905572421da"
            ],
            "Write": [
       TextModel" : "ada2"
  },
  "Metadata": {
    "RightsManagement": {
        "058b5713-a7d6-45fe-81fc-bcb8b1925fbf",
                "dd100b7a-efd0-44e3-8816-0905572421da",
                "da100b7a-efd0-44e3-8816-0905572421da"
            ],
            "Read": [
                "058b5713-a7d6-45fe-81fc-bcb8b1925fbf",
                "dd100b7a-efd0-44e3-8816-0905572421da",
                "330060ae-548c-474f-a863-9673fdf99458",
                "de100b7a-efd0-44e3-8816-0905572421da",
                "df100b7a-efd0-44e3-8816-0905572421da",
                "da100b7a-efd0-44e3-8816-0905572421da"
            ]
        Permissions": {...},
        "RecordPhase": "Concept",
        "ExpiryDate": null,
        "ExpiryStatus": null,
        "Zone": {}
    }
  },

 "Config": {
    "TextModel" : "ada2"
  }
}

Expected headers:

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

...

Ex.

Code Block
languagejson
{
  "Description": "This is an image of a cat"
}

POST /

...

generative-

...

metadata

Record as json JSON body in Metadata property, Describe Fields with as items Dotted dotted keys and AI hint as value, Locale as the requested target locale for the output and finally Config based on config rules

...

Code Block
languagejson
{
  "Metadata": {
    "RightsManagementFields": { 
       "Permissions": {
            "Export": [
                "058b5713-a7d6-45fe-81fc-bcb8b1925fbf",
                "dd100b7a-efd0-44e3-8816-0905572421da",
                "da100b7a-efd0-44e3-8816-0905572421da"
            ],
            "Write": [
                "058b5713-a7d6-45fe-81fc-bcb8b1925fbf",
                "dd100b7a-efd0-44e3-8816-0905572421da",
                "da100b7a-efd0-44e3-8816-0905572421da"
            ],
            "Read": [
                "058b5713-a7d6-45fe-81fc-bcb8b1925fbf",
                "dd100b7a-efd0-44e3-8816-0905572421da",
                "330060ae-548c-474f-a863-9673fdf99458",
                "de100b7a-efd0-44e3-8816-0905572421da",
 "Descriptive.Description": "Give a description for the image"
  },
  "Locale": "en_US",
  "Config": {
    "TextModel" : "ada2"
  },
  "Metadata": {
    "RightsManagement": {
              "df100b7a-efd0-44e3-8816-0905572421da",
                "da100b7a-efd0-44e3-8816-0905572421da"
            ]
        "Permissions": {...},
        "RecordPhase": "Concept",
        "ExpiryDate": null,
        "ExpiryStatus": null,
        "Zone": {}
    }
  },
  "Fields":
     { 
    "Descriptive.Description": "Give a description for the image"
    } 
  ,

 "Locale": "en_US",
  "Config": {
    "TextModel" : "ada2"
  }
}

Expected headers:

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

Output

Follow the input fields, the same structure should be returned

Ex:

Code Block
languagejson
{ 
  "Metadata": {
    "Descriptive.Description": "This is an image of a cat"  
  }
}