Skip to content

Commit

Permalink
corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
Skye Bender-deMoll committed Sep 24, 2024
1 parent 5ed87e0 commit 35c5d95
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions docs/request.response.structures.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ General design

* Models that don't handle requests in parallel need to implement batch format (but can give errors if they recieve more than 1 item)
* "top level" elements are processed and controlled by the Presto system
* elements inside parameters, and inside individual input items are passed through to the model
* Elements inside parameters, and inside individual input items are passed through to the model
* All of the content in a batch (a single html request) must go to the same model
* Any parameter settings to the model must apply to all items in batch
* Request itself needs a unique id, (and this is different than the id of the content)
* There is single callback URL for entire batch
* Some items need additional input parameters per item (i.e. “language” for YAKE), Presto just passes thes through
* All input_items must include an `id` element that can be used as a reference from the output items to match up paramters

Example PROPOSED input object structure (classycat)
```
Expand Down Expand Up @@ -54,20 +55,13 @@ Example PROPOSED input object structure (YAKE)
},
input_items:[
{
id:"111",
id:"11",
text:"this is some text to classify",
workspace_id:"timpani_meedan",
target_state:"keyworded",
language:"en",

},
{
id:"112",
text:"Este é um texto para classificar",
workspace_id:"timpani_meedan",
target_state:"keyworded",
language:"pt"
},
],
callback_url: "http://conductor/batch_reply/",
}
Expand All @@ -83,7 +77,7 @@ Example 'curl' command

* The outgoing reponse request includes the payloads and parameters from the incoming request
* items in the response must to include their id, so that the caller can match individual-level properties from incoming request.
* status code is present at top level so it can be checked to know how to parse the rest of the
* status code is present at top level so it can be checked to know how to parse the rest of the payload (error etc)

Example PROPOSED output structure
```
Expand Down

0 comments on commit 35c5d95

Please sign in to comment.