Skip to content

Commit

Permalink
add ids to call, iteration, and validation outcome
Browse files Browse the repository at this point in the history
  • Loading branch information
CalebCourier committed Jun 17, 2024
1 parent 729c983 commit 7365756
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
9 changes: 8 additions & 1 deletion schemas/core/call.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"title": "Call",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier for this Call. Can be used as an identifier for a specific execution of a Guard."
},
"iterations": {
"type": "array",
"items": {
Expand Down Expand Up @@ -45,5 +49,8 @@
}
]
}
}
},
"required": [
"id"
]
}
18 changes: 17 additions & 1 deletion schemas/core/iteration.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,28 @@
"title": "Iteration",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier for this Call. Can be used as an identifier for a specific execution of a Guard."
},
"index": {
"type": "integer",
"description": "The zero-based index of this iteration within the current Call."
},
"call_id": {
"type": "string",
"description": "The unique identifier for the Call that this iteration is a part of."
},
"inputs": {
"$ref": "https://raw.githubusercontent.com/guardrails-ai/interfaces/main/schemas/core/inputs.json"
},
"outputs": {
"$ref": "https://raw.githubusercontent.com/guardrails-ai/interfaces/main/schemas/core/outputs.json"
}
},
"required": []
"required": [
"id",
"index",
"call_id"
]
}
9 changes: 8 additions & 1 deletion schemas/core/validation-outcome.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"description": "The output from a Guard execution.",
"type": "object",
"properties": {
"call_id": {
"type": "string",
"description": "Foreign key to the most recent Call this resulted from."
},
"rawLlmOutput": {
"type": "string",
"description": "The raw, unchanged string content from the LLM call."
Expand Down Expand Up @@ -39,5 +43,8 @@
"type": "string",
"description": "If the validation process raised a handleable exception, this field will contain the error message."
}
}
},
"required": [
"call_id"
]
}

0 comments on commit 7365756

Please sign in to comment.