Follow

Guide to: Configuring and Enabling a Model

Overview

ADAP supports bringing your own model, for a use case example, please see this article.

A model belongs to a team, and can be found via the Account page, on the MODELS tab:

https://client.appen.com/account/teams/${TEAM_ID}/models

image (8).png

Note

In order to see the models tab, your team must be enabled with the LLM feature flag and you must be team admin. Please contact your CSM or help@appen.com for assistance.

Configure a model

This interface allows an ADAP job to securely store information on how to interact with your model, define rate access limits, and translate the messages sent/received into formats that can be interpreted by both sides. When creating or editing a model, you will be presented with the following list of fields:

  • name (string,required): the name you define for your model
  • endpoint (string, required): your model endpoint
  • description (string, optional): the description you define for your model
  • header (JSON, required):
    • Header to be used when calling model endpoint. If the model contains an API secret, this API secret can be stored as an encrypted value by providing parameter ${secret} instead of key.
  • Example: {"Content-Type": "application/json","Authorization": "${secret}"}
  • secret key (string, optional):
    • The secret key is a value used to authenticate requests / access to your API
    • Value for API secret ${secret} found on header, if defined.
    • Example: Bearer 123
  • http method (string, required):
    • HTTP method used when calling model endpoint.
  • input schema (JSON, required):
    • Schema to translate message from Appen jobs to your model. Appen jobs will always send messages using the internal structure shown below.
    • [{ message: string, role: string }]
    • If your model doesn’t use the same structure, input schema field can be used for this translation.
    • payload (JSON, optional):
      • Payload refers to the data that is sent in the request / received in the response.
      • This input defines the structure of the payload sent to your model;
    • message_item (JSON, optional):
      • Defines the structure of the message sent to your model.

Example configuration for an Open Ai Chat Completion

  • output schema (string, required):
    • Schema to translate response from your model into Appen internal structure shown below.
    • [{ text: string, role: string}]
    • type (string, required)
      • Type of response received by customer model. “single-result” or “multi-result”
    • results (string, optional)
      • Path where response can be found, if “multi-result” type
    • text (string, required)
      • Path where text response can be found
    • role (string, required)
      • Path where role response can be found

Example configuration for Open Ai Chat Completion

  • method param (string, required): request method. “REQUEST_BODY” or “REQUEST_PARAM”
  • rate (string, optional): maximum times to call the model per rateintervalinsec
  • rateintervalinsec (string, optional): span of time (seconds)
    • Example: when rate: 10 & rateintervalinsec: 60, the model will be called a maximum of 10 times per 60 seconds.

Model Templates

Two popular public-use models are provided under model templates to allow you to get started quickly and easily. 

Screenshot 2024-01-26 at 1.03.24 PM.png

When you select a model template, all required fields will be filled except for the secret key. If you already have your secret key, you can enter it here. To obtain a secret key visit the model's API website. 

You can customize the model name, model description, and edit any other fields to tailor the model to your specific use case(s).

Enable a Model in a Job

Once you have successfully configured a model, you can then enable it to be used within each individual job. As long as your team has feature flag LLM enabled (speak to your CSM or contact help@appen.com for assistance), you will see a link "Manage Language Models" and you will be able to manage and enable the available models in your current job.

 

f86fef0d-d525-46d2-a723-f43c1f656e8c.png

 

Upon clicking this link, you will be presented with a list of models available to this job's team. Click on the checkbox to enable the model to the job. 

Screen Shot 2023-07-23 at 10.38.04 PM.png

 

 


Was this article helpful?
0 out of 0 found this helpful


Have more questions? Submit a request
Powered by Zendesk