Endpoints

Endpoints are used to access the scoring API. The API is used to access the scoring engine and return results for the configured use case.

The recommended APIs to use to interact with the ecosystem.Ai runtime are the /invocations API for receiving results from the ecosystem.Ai runtime and the /responses API for sending feedback to the ecosystem.Ai runtime. If required the APIs can be customised to suit the use-case and the model being used.

UI Frameworks contains examples of integation of these endpoints with different chaneel interfaces.

API Parameters

When using the /invocations API to access results, you will need to include the following parameters:

Campaign

This is the same name as provided when configuring project deployment settings. For dynamic recommenders ensure that the names are the same.

Sub-Campaign

The sub-campaign can be used to differentiate between different models that are used in the same campaign. This is useful when using multiple models in the same campaign.

Lookup

If there is a parameter lookup configured, then this is the value that will be used to lookup the model scoring parameters. If there is no lookup configured, then this value will be ignored.

Channel

Different channels can be used to access the scores. This is useful when using the same model in different channels.

Responses

The number of responses to return. This is useful when using the API to return multiple scores. For data lookup options only one response is returned.

The in_param parameter

With the Score API Selected, use the following options for in_params.

Model based recommender:

{}

Note that this approach will bypass any parameter lookup settings in the project deployment configuration. Model based configurations that require data lookup replacement use:

{
  "input":["model_param1","model_param2"],
  "value":["value to score","value to score"]
}

Dynamic recommenders use:

{
  "input":["contextual_variable_one","contextual_variable_two"],
  "value":["",""]
}

Tensorflow or PyTorch models:

{
  "input":["text"],
  "value":["Place text here"],
  "type":"dense_1"
}

Question and answer approaches with deep learning models:

{
  "input":["text","question"],
  "value":["BBC Japan was a general entertainment Channel. Which operated between December 2004 and April 2006.","When did BBC Japan start broadcasting?"],
  "type":"qa"
}