mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-29 03:14:19 +00:00
Regenerate openapi
This commit is contained in:
parent
e951852848
commit
d7dc69c8a9
4 changed files with 933 additions and 90 deletions
|
@ -21,7 +21,7 @@
|
||||||
"info": {
|
"info": {
|
||||||
"title": "Llama Stack Specification",
|
"title": "Llama Stack Specification",
|
||||||
"version": "alpha",
|
"version": "alpha",
|
||||||
"description": "This is the specification of the Llama Stack that provides\n a set of endpoints and their corresponding interfaces that are tailored to\n best leverage Llama Models. Generated at 2024-11-22 17:23:55.034164"
|
"description": "This is the specification of the Llama Stack that provides\n a set of endpoints and their corresponding interfaces that are tailored to\n best leverage Llama Models."
|
||||||
},
|
},
|
||||||
"servers": [
|
"servers": [
|
||||||
{
|
{
|
||||||
|
@ -29,6 +29,39 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
|
"/alpha/datasetio/append-rows": {
|
||||||
|
"post": {
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tags": [
|
||||||
|
"DatasetIO"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "X-LlamaStack-ProviderData",
|
||||||
|
"in": "header",
|
||||||
|
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/AppendRowsRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/alpha/batch-inference/chat-completion": {
|
"/alpha/batch-inference/chat-completion": {
|
||||||
"post": {
|
"post": {
|
||||||
"responses": {
|
"responses": {
|
||||||
|
@ -1026,15 +1059,15 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/alpha/telemetry/get-trace": {
|
"/alpha/telemetry/get-span-tree": {
|
||||||
"get": {
|
"post": {
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/components/schemas/Trace"
|
"$ref": "#/components/schemas/SpanWithChildren"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1045,13 +1078,21 @@
|
||||||
],
|
],
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "trace_id",
|
"name": "span_id",
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "max_depth",
|
||||||
|
"in": "query",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "X-LlamaStack-ProviderData",
|
"name": "X-LlamaStack-ProviderData",
|
||||||
"in": "header",
|
"in": "header",
|
||||||
|
@ -1061,7 +1102,17 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/GetSpanTreeRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/alpha/post-training/job/artifacts": {
|
"/alpha/post-training/job/artifacts": {
|
||||||
|
@ -1778,6 +1829,86 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/alpha/telemetry/query-spans": {
|
||||||
|
"post": {
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"content": {
|
||||||
|
"application/jsonl": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/Span"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tags": [
|
||||||
|
"Telemetry"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "X-LlamaStack-ProviderData",
|
||||||
|
"in": "header",
|
||||||
|
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/QuerySpansRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/alpha/telemetry/query-traces": {
|
||||||
|
"post": {
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"content": {
|
||||||
|
"application/jsonl": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/Trace"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tags": [
|
||||||
|
"Telemetry"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "X-LlamaStack-ProviderData",
|
||||||
|
"in": "header",
|
||||||
|
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/QueryTracesRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/alpha/datasets/register": {
|
"/alpha/datasets/register": {
|
||||||
"post": {
|
"post": {
|
||||||
"responses": {
|
"responses": {
|
||||||
|
@ -2066,6 +2197,39 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/alpha/telemetry/save-spans-to-dataset": {
|
||||||
|
"post": {
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tags": [
|
||||||
|
"Telemetry"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "X-LlamaStack-ProviderData",
|
||||||
|
"in": "header",
|
||||||
|
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/SaveSpansToDatasetRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/alpha/scoring/score": {
|
"/alpha/scoring/score": {
|
||||||
"post": {
|
"post": {
|
||||||
"responses": {
|
"responses": {
|
||||||
|
@ -2226,6 +2390,39 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/alpha/datasets/unregister": {
|
||||||
|
"post": {
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tags": [
|
||||||
|
"Datasets"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "X-LlamaStack-ProviderData",
|
||||||
|
"in": "header",
|
||||||
|
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/UnregisterDatasetRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/alpha/memory-banks/unregister": {
|
"/alpha/memory-banks/unregister": {
|
||||||
"post": {
|
"post": {
|
||||||
"responses": {
|
"responses": {
|
||||||
|
@ -2291,44 +2488,52 @@
|
||||||
"required": true
|
"required": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"/alpha/datasets/unregister": {
|
|
||||||
"post": {
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "OK"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tags": [
|
|
||||||
"Datasets"
|
|
||||||
],
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"name": "X-LlamaStack-ProviderData",
|
|
||||||
"in": "header",
|
|
||||||
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
|
|
||||||
"required": false,
|
|
||||||
"schema": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"requestBody": {
|
|
||||||
"content": {
|
|
||||||
"application/json": {
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/components/schemas/UnregisterDatasetRequest"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
|
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
|
||||||
"components": {
|
"components": {
|
||||||
"schemas": {
|
"schemas": {
|
||||||
|
"AppendRowsRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"dataset_id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"rows": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "array"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"dataset_id",
|
||||||
|
"rows"
|
||||||
|
]
|
||||||
|
},
|
||||||
"BuiltinTool": {
|
"BuiltinTool": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
|
@ -5878,13 +6083,38 @@
|
||||||
],
|
],
|
||||||
"title": "A safety shield resource that can be used to check content"
|
"title": "A safety shield resource that can be used to check content"
|
||||||
},
|
},
|
||||||
"Trace": {
|
"GetSpanTreeRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"attributes_to_return": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
|
"SpanStatus": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"ok",
|
||||||
|
"error"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"SpanWithChildren": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"span_id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"trace_id": {
|
"trace_id": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"root_span_id": {
|
"parent_span_id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"start_time": {
|
"start_time": {
|
||||||
|
@ -5894,13 +6124,49 @@
|
||||||
"end_time": {
|
"end_time": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "date-time"
|
"format": "date-time"
|
||||||
|
},
|
||||||
|
"attributes": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "array"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"children": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/SpanWithChildren"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"$ref": "#/components/schemas/SpanStatus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"required": [
|
"required": [
|
||||||
|
"span_id",
|
||||||
"trace_id",
|
"trace_id",
|
||||||
"root_span_id",
|
"name",
|
||||||
"start_time"
|
"start_time",
|
||||||
|
"children"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"Checkpoint": {
|
"Checkpoint": {
|
||||||
|
@ -6313,13 +6579,6 @@
|
||||||
"name"
|
"name"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"SpanStatus": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"ok",
|
|
||||||
"error"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"StructuredLogEvent": {
|
"StructuredLogEvent": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -6458,11 +6717,15 @@
|
||||||
"$ref": "#/components/schemas/StructuredLogEvent"
|
"$ref": "#/components/schemas/StructuredLogEvent"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"ttl_seconds": {
|
||||||
|
"type": "integer"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"required": [
|
"required": [
|
||||||
"event"
|
"event",
|
||||||
|
"ttl_seconds"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"DPOAlignmentConfig": {
|
"DPOAlignmentConfig": {
|
||||||
|
@ -6772,6 +7035,185 @@
|
||||||
"scores"
|
"scores"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"QueryCondition": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"key": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"op": {
|
||||||
|
"$ref": "#/components/schemas/QueryConditionOp"
|
||||||
|
},
|
||||||
|
"value": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "array"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"key",
|
||||||
|
"op",
|
||||||
|
"value"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"QueryConditionOp": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"eq",
|
||||||
|
"ne",
|
||||||
|
"gt",
|
||||||
|
"lt"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"QuerySpansRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"attribute_filters": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/QueryCondition"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"attributes_to_return": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"max_depth": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"attribute_filters",
|
||||||
|
"attributes_to_return"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Span": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"span_id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"trace_id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"parent_span_id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"start_time": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time"
|
||||||
|
},
|
||||||
|
"end_time": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time"
|
||||||
|
},
|
||||||
|
"attributes": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "array"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"span_id",
|
||||||
|
"trace_id",
|
||||||
|
"name",
|
||||||
|
"start_time"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"QueryTracesRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"attribute_filters": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/QueryCondition"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"limit": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"offset": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"order_by": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
|
"Trace": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"trace_id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"root_span_id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"start_time": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time"
|
||||||
|
},
|
||||||
|
"end_time": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"trace_id",
|
||||||
|
"root_span_id",
|
||||||
|
"start_time"
|
||||||
|
]
|
||||||
|
},
|
||||||
"RegisterDatasetRequest": {
|
"RegisterDatasetRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -7488,6 +7930,35 @@
|
||||||
},
|
},
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
},
|
},
|
||||||
|
"SaveSpansToDatasetRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"attribute_filters": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/QueryCondition"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"attributes_to_save": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dataset_id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"max_depth": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"attribute_filters",
|
||||||
|
"attributes_to_save",
|
||||||
|
"dataset_id"
|
||||||
|
]
|
||||||
|
},
|
||||||
"ScoreRequest": {
|
"ScoreRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -7927,6 +8398,18 @@
|
||||||
],
|
],
|
||||||
"title": "Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold."
|
"title": "Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold."
|
||||||
},
|
},
|
||||||
|
"UnregisterDatasetRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"dataset_id": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"dataset_id"
|
||||||
|
]
|
||||||
|
},
|
||||||
"UnregisterMemoryBankRequest": {
|
"UnregisterMemoryBankRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -7950,18 +8433,6 @@
|
||||||
"required": [
|
"required": [
|
||||||
"model_id"
|
"model_id"
|
||||||
]
|
]
|
||||||
},
|
|
||||||
"UnregisterDatasetRequest": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"dataset_id": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"additionalProperties": false,
|
|
||||||
"required": [
|
|
||||||
"dataset_id"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"responses": {}
|
"responses": {}
|
||||||
|
@ -8027,6 +8498,10 @@
|
||||||
"name": "AppEvalTaskConfig",
|
"name": "AppEvalTaskConfig",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AppEvalTaskConfig\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AppEvalTaskConfig\" />"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "AppendRowsRequest",
|
||||||
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AppendRowsRequest\" />"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Attachment",
|
"name": "Attachment",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/Attachment\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/Attachment\" />"
|
||||||
|
@ -8182,6 +8657,10 @@
|
||||||
"name": "GetAgentsSessionRequest",
|
"name": "GetAgentsSessionRequest",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/GetAgentsSessionRequest\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/GetAgentsSessionRequest\" />"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "GetSpanTreeRequest",
|
||||||
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/GetSpanTreeRequest\" />"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "GraphMemoryBank",
|
"name": "GraphMemoryBank",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/GraphMemoryBank\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/GraphMemoryBank\" />"
|
||||||
|
@ -8336,6 +8815,14 @@
|
||||||
"name": "QLoraFinetuningConfig",
|
"name": "QLoraFinetuningConfig",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/QLoraFinetuningConfig\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/QLoraFinetuningConfig\" />"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "QueryCondition",
|
||||||
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/QueryCondition\" />"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "QueryConditionOp",
|
||||||
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/QueryConditionOp\" />"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "QueryDocumentsRequest",
|
"name": "QueryDocumentsRequest",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/QueryDocumentsRequest\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/QueryDocumentsRequest\" />"
|
||||||
|
@ -8344,6 +8831,14 @@
|
||||||
"name": "QueryDocumentsResponse",
|
"name": "QueryDocumentsResponse",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/QueryDocumentsResponse\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/QueryDocumentsResponse\" />"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "QuerySpansRequest",
|
||||||
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/QuerySpansRequest\" />"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "QueryTracesRequest",
|
||||||
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/QueryTracesRequest\" />"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "RLHFAlgorithm",
|
"name": "RLHFAlgorithm",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/RLHFAlgorithm\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/RLHFAlgorithm\" />"
|
||||||
|
@ -8415,6 +8910,10 @@
|
||||||
"name": "SamplingStrategy",
|
"name": "SamplingStrategy",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/SamplingStrategy\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/SamplingStrategy\" />"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "SaveSpansToDatasetRequest",
|
||||||
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/SaveSpansToDatasetRequest\" />"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "ScoreBatchRequest",
|
"name": "ScoreBatchRequest",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ScoreBatchRequest\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ScoreBatchRequest\" />"
|
||||||
|
@ -8464,6 +8963,10 @@
|
||||||
{
|
{
|
||||||
"name": "Shields"
|
"name": "Shields"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "Span",
|
||||||
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/Span\" />"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "SpanEndPayload",
|
"name": "SpanEndPayload",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/SpanEndPayload\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/SpanEndPayload\" />"
|
||||||
|
@ -8476,6 +8979,10 @@
|
||||||
"name": "SpanStatus",
|
"name": "SpanStatus",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/SpanStatus\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/SpanStatus\" />"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "SpanWithChildren",
|
||||||
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/SpanWithChildren\" />"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "StopReason",
|
"name": "StopReason",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/StopReason\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/StopReason\" />"
|
||||||
|
@ -8566,6 +9073,10 @@
|
||||||
"name": "URL",
|
"name": "URL",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/URL\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/URL\" />"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "UnregisterDatasetRequest",
|
||||||
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/UnregisterDatasetRequest\" />"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "UnregisterMemoryBankRequest",
|
"name": "UnregisterMemoryBankRequest",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/UnregisterMemoryBankRequest\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/UnregisterMemoryBankRequest\" />"
|
||||||
|
@ -8574,10 +9085,6 @@
|
||||||
"name": "UnregisterModelRequest",
|
"name": "UnregisterModelRequest",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/UnregisterModelRequest\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/UnregisterModelRequest\" />"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "UnregisterDatasetRequest",
|
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/UnregisterDatasetRequest\" />"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "UnstructuredLogEvent",
|
"name": "UnstructuredLogEvent",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/UnstructuredLogEvent\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/UnstructuredLogEvent\" />"
|
||||||
|
@ -8643,6 +9150,7 @@
|
||||||
"AgentTurnResponseTurnCompletePayload",
|
"AgentTurnResponseTurnCompletePayload",
|
||||||
"AgentTurnResponseTurnStartPayload",
|
"AgentTurnResponseTurnStartPayload",
|
||||||
"AppEvalTaskConfig",
|
"AppEvalTaskConfig",
|
||||||
|
"AppendRowsRequest",
|
||||||
"Attachment",
|
"Attachment",
|
||||||
"BatchChatCompletionRequest",
|
"BatchChatCompletionRequest",
|
||||||
"BatchChatCompletionResponse",
|
"BatchChatCompletionResponse",
|
||||||
|
@ -8678,6 +9186,7 @@
|
||||||
"FinetuningAlgorithm",
|
"FinetuningAlgorithm",
|
||||||
"FunctionCallToolDefinition",
|
"FunctionCallToolDefinition",
|
||||||
"GetAgentsSessionRequest",
|
"GetAgentsSessionRequest",
|
||||||
|
"GetSpanTreeRequest",
|
||||||
"GraphMemoryBank",
|
"GraphMemoryBank",
|
||||||
"GraphMemoryBankParams",
|
"GraphMemoryBankParams",
|
||||||
"HealthInfo",
|
"HealthInfo",
|
||||||
|
@ -8712,8 +9221,12 @@
|
||||||
"PreferenceOptimizeRequest",
|
"PreferenceOptimizeRequest",
|
||||||
"ProviderInfo",
|
"ProviderInfo",
|
||||||
"QLoraFinetuningConfig",
|
"QLoraFinetuningConfig",
|
||||||
|
"QueryCondition",
|
||||||
|
"QueryConditionOp",
|
||||||
"QueryDocumentsRequest",
|
"QueryDocumentsRequest",
|
||||||
"QueryDocumentsResponse",
|
"QueryDocumentsResponse",
|
||||||
|
"QuerySpansRequest",
|
||||||
|
"QueryTracesRequest",
|
||||||
"RLHFAlgorithm",
|
"RLHFAlgorithm",
|
||||||
"RegexParserScoringFnParams",
|
"RegexParserScoringFnParams",
|
||||||
"RegisterDatasetRequest",
|
"RegisterDatasetRequest",
|
||||||
|
@ -8731,6 +9244,7 @@
|
||||||
"SafetyViolation",
|
"SafetyViolation",
|
||||||
"SamplingParams",
|
"SamplingParams",
|
||||||
"SamplingStrategy",
|
"SamplingStrategy",
|
||||||
|
"SaveSpansToDatasetRequest",
|
||||||
"ScoreBatchRequest",
|
"ScoreBatchRequest",
|
||||||
"ScoreBatchResponse",
|
"ScoreBatchResponse",
|
||||||
"ScoreRequest",
|
"ScoreRequest",
|
||||||
|
@ -8741,9 +9255,11 @@
|
||||||
"Session",
|
"Session",
|
||||||
"Shield",
|
"Shield",
|
||||||
"ShieldCallStep",
|
"ShieldCallStep",
|
||||||
|
"Span",
|
||||||
"SpanEndPayload",
|
"SpanEndPayload",
|
||||||
"SpanStartPayload",
|
"SpanStartPayload",
|
||||||
"SpanStatus",
|
"SpanStatus",
|
||||||
|
"SpanWithChildren",
|
||||||
"StopReason",
|
"StopReason",
|
||||||
"StructuredLogEvent",
|
"StructuredLogEvent",
|
||||||
"SupervisedFineTuneRequest",
|
"SupervisedFineTuneRequest",
|
||||||
|
@ -8765,9 +9281,9 @@
|
||||||
"TrainingConfig",
|
"TrainingConfig",
|
||||||
"Turn",
|
"Turn",
|
||||||
"URL",
|
"URL",
|
||||||
|
"UnregisterDatasetRequest",
|
||||||
"UnregisterMemoryBankRequest",
|
"UnregisterMemoryBankRequest",
|
||||||
"UnregisterModelRequest",
|
"UnregisterModelRequest",
|
||||||
"UnregisterDatasetRequest",
|
|
||||||
"UnstructuredLogEvent",
|
"UnstructuredLogEvent",
|
||||||
"UserMessage",
|
"UserMessage",
|
||||||
"VectorMemoryBank",
|
"VectorMemoryBank",
|
||||||
|
|
|
@ -242,6 +242,27 @@ components:
|
||||||
- eval_candidate
|
- eval_candidate
|
||||||
- scoring_params
|
- scoring_params
|
||||||
type: object
|
type: object
|
||||||
|
AppendRowsRequest:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
dataset_id:
|
||||||
|
type: string
|
||||||
|
rows:
|
||||||
|
items:
|
||||||
|
additionalProperties:
|
||||||
|
oneOf:
|
||||||
|
- type: 'null'
|
||||||
|
- type: boolean
|
||||||
|
- type: number
|
||||||
|
- type: string
|
||||||
|
- type: array
|
||||||
|
- type: object
|
||||||
|
type: object
|
||||||
|
type: array
|
||||||
|
required:
|
||||||
|
- dataset_id
|
||||||
|
- rows
|
||||||
|
type: object
|
||||||
Attachment:
|
Attachment:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
|
@ -1059,6 +1080,14 @@ components:
|
||||||
type: string
|
type: string
|
||||||
type: array
|
type: array
|
||||||
type: object
|
type: object
|
||||||
|
GetSpanTreeRequest:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
attributes_to_return:
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
GraphMemoryBank:
|
GraphMemoryBank:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
|
@ -1277,8 +1306,11 @@ components:
|
||||||
- $ref: '#/components/schemas/UnstructuredLogEvent'
|
- $ref: '#/components/schemas/UnstructuredLogEvent'
|
||||||
- $ref: '#/components/schemas/MetricEvent'
|
- $ref: '#/components/schemas/MetricEvent'
|
||||||
- $ref: '#/components/schemas/StructuredLogEvent'
|
- $ref: '#/components/schemas/StructuredLogEvent'
|
||||||
|
ttl_seconds:
|
||||||
|
type: integer
|
||||||
required:
|
required:
|
||||||
- event
|
- event
|
||||||
|
- ttl_seconds
|
||||||
type: object
|
type: object
|
||||||
LogSeverity:
|
LogSeverity:
|
||||||
enum:
|
enum:
|
||||||
|
@ -1825,6 +1857,33 @@ components:
|
||||||
- rank
|
- rank
|
||||||
- alpha
|
- alpha
|
||||||
type: object
|
type: object
|
||||||
|
QueryCondition:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
key:
|
||||||
|
type: string
|
||||||
|
op:
|
||||||
|
$ref: '#/components/schemas/QueryConditionOp'
|
||||||
|
value:
|
||||||
|
oneOf:
|
||||||
|
- type: 'null'
|
||||||
|
- type: boolean
|
||||||
|
- type: number
|
||||||
|
- type: string
|
||||||
|
- type: array
|
||||||
|
- type: object
|
||||||
|
required:
|
||||||
|
- key
|
||||||
|
- op
|
||||||
|
- value
|
||||||
|
type: object
|
||||||
|
QueryConditionOp:
|
||||||
|
enum:
|
||||||
|
- eq
|
||||||
|
- ne
|
||||||
|
- gt
|
||||||
|
- lt
|
||||||
|
type: string
|
||||||
QueryDocumentsRequest:
|
QueryDocumentsRequest:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
|
@ -1887,6 +1946,39 @@ components:
|
||||||
- chunks
|
- chunks
|
||||||
- scores
|
- scores
|
||||||
type: object
|
type: object
|
||||||
|
QuerySpansRequest:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
attribute_filters:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/QueryCondition'
|
||||||
|
type: array
|
||||||
|
attributes_to_return:
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
type: array
|
||||||
|
max_depth:
|
||||||
|
type: integer
|
||||||
|
required:
|
||||||
|
- attribute_filters
|
||||||
|
- attributes_to_return
|
||||||
|
type: object
|
||||||
|
QueryTracesRequest:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
attribute_filters:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/QueryCondition'
|
||||||
|
type: array
|
||||||
|
limit:
|
||||||
|
type: integer
|
||||||
|
offset:
|
||||||
|
type: integer
|
||||||
|
order_by:
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
RLHFAlgorithm:
|
RLHFAlgorithm:
|
||||||
enum:
|
enum:
|
||||||
- dpo
|
- dpo
|
||||||
|
@ -2392,6 +2484,26 @@ components:
|
||||||
- top_p
|
- top_p
|
||||||
- top_k
|
- top_k
|
||||||
type: string
|
type: string
|
||||||
|
SaveSpansToDatasetRequest:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
attribute_filters:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/QueryCondition'
|
||||||
|
type: array
|
||||||
|
attributes_to_save:
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
type: array
|
||||||
|
dataset_id:
|
||||||
|
type: string
|
||||||
|
max_depth:
|
||||||
|
type: integer
|
||||||
|
required:
|
||||||
|
- attribute_filters
|
||||||
|
- attributes_to_save
|
||||||
|
- dataset_id
|
||||||
|
type: object
|
||||||
ScoreBatchRequest:
|
ScoreBatchRequest:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
|
@ -2731,6 +2843,39 @@ components:
|
||||||
- step_id
|
- step_id
|
||||||
- step_type
|
- step_type
|
||||||
type: object
|
type: object
|
||||||
|
Span:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
attributes:
|
||||||
|
additionalProperties:
|
||||||
|
oneOf:
|
||||||
|
- type: 'null'
|
||||||
|
- type: boolean
|
||||||
|
- type: number
|
||||||
|
- type: string
|
||||||
|
- type: array
|
||||||
|
- type: object
|
||||||
|
type: object
|
||||||
|
end_time:
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
parent_span_id:
|
||||||
|
type: string
|
||||||
|
span_id:
|
||||||
|
type: string
|
||||||
|
start_time:
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
trace_id:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- span_id
|
||||||
|
- trace_id
|
||||||
|
- name
|
||||||
|
- start_time
|
||||||
|
type: object
|
||||||
SpanEndPayload:
|
SpanEndPayload:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
|
@ -2764,6 +2909,46 @@ components:
|
||||||
- ok
|
- ok
|
||||||
- error
|
- error
|
||||||
type: string
|
type: string
|
||||||
|
SpanWithChildren:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
attributes:
|
||||||
|
additionalProperties:
|
||||||
|
oneOf:
|
||||||
|
- type: 'null'
|
||||||
|
- type: boolean
|
||||||
|
- type: number
|
||||||
|
- type: string
|
||||||
|
- type: array
|
||||||
|
- type: object
|
||||||
|
type: object
|
||||||
|
children:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/SpanWithChildren'
|
||||||
|
type: array
|
||||||
|
end_time:
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
parent_span_id:
|
||||||
|
type: string
|
||||||
|
span_id:
|
||||||
|
type: string
|
||||||
|
start_time:
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
status:
|
||||||
|
$ref: '#/components/schemas/SpanStatus'
|
||||||
|
trace_id:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- span_id
|
||||||
|
- trace_id
|
||||||
|
- name
|
||||||
|
- start_time
|
||||||
|
- children
|
||||||
|
type: object
|
||||||
StopReason:
|
StopReason:
|
||||||
enum:
|
enum:
|
||||||
- end_of_turn
|
- end_of_turn
|
||||||
|
@ -3237,6 +3422,14 @@ components:
|
||||||
format: uri
|
format: uri
|
||||||
pattern: ^(https?://|file://|data:)
|
pattern: ^(https?://|file://|data:)
|
||||||
type: string
|
type: string
|
||||||
|
UnregisterDatasetRequest:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
dataset_id:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- dataset_id
|
||||||
|
type: object
|
||||||
UnregisterMemoryBankRequest:
|
UnregisterMemoryBankRequest:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
|
@ -3253,14 +3446,6 @@ components:
|
||||||
required:
|
required:
|
||||||
- model_id
|
- model_id
|
||||||
type: object
|
type: object
|
||||||
UnregisterDatasetRequest:
|
|
||||||
additionalProperties: false
|
|
||||||
properties:
|
|
||||||
dataset_id:
|
|
||||||
type: string
|
|
||||||
required:
|
|
||||||
- dataset_id
|
|
||||||
type: object
|
|
||||||
UnstructuredLogEvent:
|
UnstructuredLogEvent:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
|
@ -3408,7 +3593,7 @@ components:
|
||||||
info:
|
info:
|
||||||
description: "This is the specification of the Llama Stack that provides\n \
|
description: "This is the specification of the Llama Stack that provides\n \
|
||||||
\ a set of endpoints and their corresponding interfaces that are tailored\
|
\ a set of endpoints and their corresponding interfaces that are tailored\
|
||||||
\ to\n best leverage Llama Models. Generated at 2024-11-22 17:23:55.034164"
|
\ to\n best leverage Llama Models."
|
||||||
title: Llama Stack Specification
|
title: Llama Stack Specification
|
||||||
version: alpha
|
version: alpha
|
||||||
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
|
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
|
||||||
|
@ -3692,6 +3877,27 @@ paths:
|
||||||
description: OK
|
description: OK
|
||||||
tags:
|
tags:
|
||||||
- BatchInference (Coming Soon)
|
- BatchInference (Coming Soon)
|
||||||
|
/alpha/datasetio/append-rows:
|
||||||
|
post:
|
||||||
|
parameters:
|
||||||
|
- description: JSON-encoded provider data which will be made available to the
|
||||||
|
adapter servicing the API
|
||||||
|
in: header
|
||||||
|
name: X-LlamaStack-ProviderData
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/AppendRowsRequest'
|
||||||
|
required: true
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
tags:
|
||||||
|
- DatasetIO
|
||||||
/alpha/datasetio/get-rows-paginated:
|
/alpha/datasetio/get-rows-paginated:
|
||||||
get:
|
get:
|
||||||
parameters:
|
parameters:
|
||||||
|
@ -4785,14 +4991,19 @@ paths:
|
||||||
description: OK
|
description: OK
|
||||||
tags:
|
tags:
|
||||||
- SyntheticDataGeneration (Coming Soon)
|
- SyntheticDataGeneration (Coming Soon)
|
||||||
/alpha/telemetry/get-trace:
|
/alpha/telemetry/get-span-tree:
|
||||||
get:
|
post:
|
||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: trace_id
|
name: span_id
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: max_depth
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
- description: JSON-encoded provider data which will be made available to the
|
- description: JSON-encoded provider data which will be made available to the
|
||||||
adapter servicing the API
|
adapter servicing the API
|
||||||
in: header
|
in: header
|
||||||
|
@ -4800,12 +5011,18 @@ paths:
|
||||||
required: false
|
required: false
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/GetSpanTreeRequest'
|
||||||
|
required: true
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/Trace'
|
$ref: '#/components/schemas/SpanWithChildren'
|
||||||
description: OK
|
description: OK
|
||||||
tags:
|
tags:
|
||||||
- Telemetry
|
- Telemetry
|
||||||
|
@ -4830,6 +5047,77 @@ paths:
|
||||||
description: OK
|
description: OK
|
||||||
tags:
|
tags:
|
||||||
- Telemetry
|
- Telemetry
|
||||||
|
/alpha/telemetry/query-spans:
|
||||||
|
post:
|
||||||
|
parameters:
|
||||||
|
- description: JSON-encoded provider data which will be made available to the
|
||||||
|
adapter servicing the API
|
||||||
|
in: header
|
||||||
|
name: X-LlamaStack-ProviderData
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/QuerySpansRequest'
|
||||||
|
required: true
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
content:
|
||||||
|
application/jsonl:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Span'
|
||||||
|
description: OK
|
||||||
|
tags:
|
||||||
|
- Telemetry
|
||||||
|
/alpha/telemetry/query-traces:
|
||||||
|
post:
|
||||||
|
parameters:
|
||||||
|
- description: JSON-encoded provider data which will be made available to the
|
||||||
|
adapter servicing the API
|
||||||
|
in: header
|
||||||
|
name: X-LlamaStack-ProviderData
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/QueryTracesRequest'
|
||||||
|
required: true
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
content:
|
||||||
|
application/jsonl:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Trace'
|
||||||
|
description: OK
|
||||||
|
tags:
|
||||||
|
- Telemetry
|
||||||
|
/alpha/telemetry/save-spans-to-dataset:
|
||||||
|
post:
|
||||||
|
parameters:
|
||||||
|
- description: JSON-encoded provider data which will be made available to the
|
||||||
|
adapter servicing the API
|
||||||
|
in: header
|
||||||
|
name: X-LlamaStack-ProviderData
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/SaveSpansToDatasetRequest'
|
||||||
|
required: true
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
tags:
|
||||||
|
- Telemetry
|
||||||
security:
|
security:
|
||||||
- Default: []
|
- Default: []
|
||||||
servers:
|
servers:
|
||||||
|
@ -4878,6 +5166,9 @@ tags:
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/AppEvalTaskConfig"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/AppEvalTaskConfig"
|
||||||
/>
|
/>
|
||||||
name: AppEvalTaskConfig
|
name: AppEvalTaskConfig
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/AppendRowsRequest"
|
||||||
|
/>
|
||||||
|
name: AppendRowsRequest
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/Attachment" />
|
- description: <SchemaDefinition schemaRef="#/components/schemas/Attachment" />
|
||||||
name: Attachment
|
name: Attachment
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/BatchChatCompletionRequest"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/BatchChatCompletionRequest"
|
||||||
|
@ -4999,6 +5290,9 @@ tags:
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/GetAgentsSessionRequest"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/GetAgentsSessionRequest"
|
||||||
/>
|
/>
|
||||||
name: GetAgentsSessionRequest
|
name: GetAgentsSessionRequest
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/GetSpanTreeRequest"
|
||||||
|
/>
|
||||||
|
name: GetSpanTreeRequest
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/GraphMemoryBank"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/GraphMemoryBank"
|
||||||
/>
|
/>
|
||||||
name: GraphMemoryBank
|
name: GraphMemoryBank
|
||||||
|
@ -5105,12 +5399,23 @@ tags:
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/QLoraFinetuningConfig"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/QLoraFinetuningConfig"
|
||||||
/>
|
/>
|
||||||
name: QLoraFinetuningConfig
|
name: QLoraFinetuningConfig
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/QueryCondition" />
|
||||||
|
name: QueryCondition
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/QueryConditionOp"
|
||||||
|
/>
|
||||||
|
name: QueryConditionOp
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/QueryDocumentsRequest"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/QueryDocumentsRequest"
|
||||||
/>
|
/>
|
||||||
name: QueryDocumentsRequest
|
name: QueryDocumentsRequest
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/QueryDocumentsResponse"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/QueryDocumentsResponse"
|
||||||
/>
|
/>
|
||||||
name: QueryDocumentsResponse
|
name: QueryDocumentsResponse
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/QuerySpansRequest"
|
||||||
|
/>
|
||||||
|
name: QuerySpansRequest
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/QueryTracesRequest"
|
||||||
|
/>
|
||||||
|
name: QueryTracesRequest
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/RLHFAlgorithm" />
|
- description: <SchemaDefinition schemaRef="#/components/schemas/RLHFAlgorithm" />
|
||||||
name: RLHFAlgorithm
|
name: RLHFAlgorithm
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/RegexParserScoringFnParams"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/RegexParserScoringFnParams"
|
||||||
|
@ -5158,6 +5463,9 @@ tags:
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/SamplingStrategy"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/SamplingStrategy"
|
||||||
/>
|
/>
|
||||||
name: SamplingStrategy
|
name: SamplingStrategy
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/SaveSpansToDatasetRequest"
|
||||||
|
/>
|
||||||
|
name: SaveSpansToDatasetRequest
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/ScoreBatchRequest"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/ScoreBatchRequest"
|
||||||
/>
|
/>
|
||||||
name: ScoreBatchRequest
|
name: ScoreBatchRequest
|
||||||
|
@ -5190,6 +5498,8 @@ tags:
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/ShieldCallStep" />
|
- description: <SchemaDefinition schemaRef="#/components/schemas/ShieldCallStep" />
|
||||||
name: ShieldCallStep
|
name: ShieldCallStep
|
||||||
- name: Shields
|
- name: Shields
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/Span" />
|
||||||
|
name: Span
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/SpanEndPayload" />
|
- description: <SchemaDefinition schemaRef="#/components/schemas/SpanEndPayload" />
|
||||||
name: SpanEndPayload
|
name: SpanEndPayload
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/SpanStartPayload"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/SpanStartPayload"
|
||||||
|
@ -5197,6 +5507,9 @@ tags:
|
||||||
name: SpanStartPayload
|
name: SpanStartPayload
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/SpanStatus" />
|
- description: <SchemaDefinition schemaRef="#/components/schemas/SpanStatus" />
|
||||||
name: SpanStatus
|
name: SpanStatus
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/SpanWithChildren"
|
||||||
|
/>
|
||||||
|
name: SpanWithChildren
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/StopReason" />
|
- description: <SchemaDefinition schemaRef="#/components/schemas/StopReason" />
|
||||||
name: StopReason
|
name: StopReason
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/StructuredLogEvent"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/StructuredLogEvent"
|
||||||
|
@ -5265,15 +5578,15 @@ tags:
|
||||||
name: Turn
|
name: Turn
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/URL" />
|
- description: <SchemaDefinition schemaRef="#/components/schemas/URL" />
|
||||||
name: URL
|
name: URL
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/UnregisterDatasetRequest"
|
||||||
|
/>
|
||||||
|
name: UnregisterDatasetRequest
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/UnregisterMemoryBankRequest"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/UnregisterMemoryBankRequest"
|
||||||
/>
|
/>
|
||||||
name: UnregisterMemoryBankRequest
|
name: UnregisterMemoryBankRequest
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/UnregisterModelRequest"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/UnregisterModelRequest"
|
||||||
/>
|
/>
|
||||||
name: UnregisterModelRequest
|
name: UnregisterModelRequest
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/UnregisterDatasetRequest"
|
|
||||||
/>
|
|
||||||
name: UnregisterDatasetRequest
|
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/UnstructuredLogEvent"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/UnstructuredLogEvent"
|
||||||
/>
|
/>
|
||||||
name: UnstructuredLogEvent
|
name: UnstructuredLogEvent
|
||||||
|
@ -5326,6 +5639,7 @@ x-tagGroups:
|
||||||
- AgentTurnResponseTurnCompletePayload
|
- AgentTurnResponseTurnCompletePayload
|
||||||
- AgentTurnResponseTurnStartPayload
|
- AgentTurnResponseTurnStartPayload
|
||||||
- AppEvalTaskConfig
|
- AppEvalTaskConfig
|
||||||
|
- AppendRowsRequest
|
||||||
- Attachment
|
- Attachment
|
||||||
- BatchChatCompletionRequest
|
- BatchChatCompletionRequest
|
||||||
- BatchChatCompletionResponse
|
- BatchChatCompletionResponse
|
||||||
|
@ -5361,6 +5675,7 @@ x-tagGroups:
|
||||||
- FinetuningAlgorithm
|
- FinetuningAlgorithm
|
||||||
- FunctionCallToolDefinition
|
- FunctionCallToolDefinition
|
||||||
- GetAgentsSessionRequest
|
- GetAgentsSessionRequest
|
||||||
|
- GetSpanTreeRequest
|
||||||
- GraphMemoryBank
|
- GraphMemoryBank
|
||||||
- GraphMemoryBankParams
|
- GraphMemoryBankParams
|
||||||
- HealthInfo
|
- HealthInfo
|
||||||
|
@ -5395,8 +5710,12 @@ x-tagGroups:
|
||||||
- PreferenceOptimizeRequest
|
- PreferenceOptimizeRequest
|
||||||
- ProviderInfo
|
- ProviderInfo
|
||||||
- QLoraFinetuningConfig
|
- QLoraFinetuningConfig
|
||||||
|
- QueryCondition
|
||||||
|
- QueryConditionOp
|
||||||
- QueryDocumentsRequest
|
- QueryDocumentsRequest
|
||||||
- QueryDocumentsResponse
|
- QueryDocumentsResponse
|
||||||
|
- QuerySpansRequest
|
||||||
|
- QueryTracesRequest
|
||||||
- RLHFAlgorithm
|
- RLHFAlgorithm
|
||||||
- RegexParserScoringFnParams
|
- RegexParserScoringFnParams
|
||||||
- RegisterDatasetRequest
|
- RegisterDatasetRequest
|
||||||
|
@ -5414,6 +5733,7 @@ x-tagGroups:
|
||||||
- SafetyViolation
|
- SafetyViolation
|
||||||
- SamplingParams
|
- SamplingParams
|
||||||
- SamplingStrategy
|
- SamplingStrategy
|
||||||
|
- SaveSpansToDatasetRequest
|
||||||
- ScoreBatchRequest
|
- ScoreBatchRequest
|
||||||
- ScoreBatchResponse
|
- ScoreBatchResponse
|
||||||
- ScoreRequest
|
- ScoreRequest
|
||||||
|
@ -5424,9 +5744,11 @@ x-tagGroups:
|
||||||
- Session
|
- Session
|
||||||
- Shield
|
- Shield
|
||||||
- ShieldCallStep
|
- ShieldCallStep
|
||||||
|
- Span
|
||||||
- SpanEndPayload
|
- SpanEndPayload
|
||||||
- SpanStartPayload
|
- SpanStartPayload
|
||||||
- SpanStatus
|
- SpanStatus
|
||||||
|
- SpanWithChildren
|
||||||
- StopReason
|
- StopReason
|
||||||
- StructuredLogEvent
|
- StructuredLogEvent
|
||||||
- SupervisedFineTuneRequest
|
- SupervisedFineTuneRequest
|
||||||
|
@ -5448,9 +5770,9 @@ x-tagGroups:
|
||||||
- TrainingConfig
|
- TrainingConfig
|
||||||
- Turn
|
- Turn
|
||||||
- URL
|
- URL
|
||||||
|
- UnregisterDatasetRequest
|
||||||
- UnregisterMemoryBankRequest
|
- UnregisterMemoryBankRequest
|
||||||
- UnregisterModelRequest
|
- UnregisterModelRequest
|
||||||
- UnregisterDatasetRequest
|
|
||||||
- UnstructuredLogEvent
|
- UnstructuredLogEvent
|
||||||
- UserMessage
|
- UserMessage
|
||||||
- VectorMemoryBank
|
- VectorMemoryBank
|
||||||
|
|
|
@ -155,16 +155,23 @@ class SpanWithChildren(Span):
|
||||||
status: Optional[SpanStatus] = None
|
status: Optional[SpanStatus] = None
|
||||||
|
|
||||||
|
|
||||||
|
@json_schema_type
|
||||||
|
class QueryConditionOp(Enum):
|
||||||
|
EQ = "eq"
|
||||||
|
NE = "ne"
|
||||||
|
GT = "gt"
|
||||||
|
LT = "lt"
|
||||||
|
|
||||||
|
|
||||||
@json_schema_type
|
@json_schema_type
|
||||||
class QueryCondition(BaseModel):
|
class QueryCondition(BaseModel):
|
||||||
key: str
|
key: str
|
||||||
op: Literal["eq", "ne", "gt", "lt"]
|
op: QueryConditionOp
|
||||||
value: Any
|
value: Any
|
||||||
|
|
||||||
|
|
||||||
@runtime_checkable
|
@runtime_checkable
|
||||||
class Telemetry(Protocol):
|
class Telemetry(Protocol):
|
||||||
|
|
||||||
@webmethod(route="/telemetry/log-event")
|
@webmethod(route="/telemetry/log-event")
|
||||||
async def log_event(
|
async def log_event(
|
||||||
self, event: Event, ttl_seconds: int = DEFAULT_TTL_DAYS * 86400
|
self, event: Event, ttl_seconds: int = DEFAULT_TTL_DAYS * 86400
|
||||||
|
|
|
@ -14,7 +14,6 @@ from llama_stack.apis.telemetry import QueryCondition, SpanWithChildren, Trace
|
||||||
|
|
||||||
|
|
||||||
class TraceStore(Protocol):
|
class TraceStore(Protocol):
|
||||||
|
|
||||||
async def query_traces(
|
async def query_traces(
|
||||||
self,
|
self,
|
||||||
attribute_filters: Optional[List[QueryCondition]] = None,
|
attribute_filters: Optional[List[QueryCondition]] = None,
|
||||||
|
@ -42,7 +41,6 @@ class SQLiteTraceStore(TraceStore):
|
||||||
offset: Optional[int] = 0,
|
offset: Optional[int] = 0,
|
||||||
order_by: Optional[List[str]] = None,
|
order_by: Optional[List[str]] = None,
|
||||||
) -> List[Trace]:
|
) -> List[Trace]:
|
||||||
|
|
||||||
def build_where_clause() -> tuple[str, list]:
|
def build_where_clause() -> tuple[str, list]:
|
||||||
if not attribute_filters:
|
if not attribute_filters:
|
||||||
return "", []
|
return "", []
|
||||||
|
@ -50,7 +48,7 @@ class SQLiteTraceStore(TraceStore):
|
||||||
ops_map = {"eq": "=", "ne": "!=", "gt": ">", "lt": "<"}
|
ops_map = {"eq": "=", "ne": "!=", "gt": ">", "lt": "<"}
|
||||||
|
|
||||||
conditions = [
|
conditions = [
|
||||||
f"json_extract(s.attributes, '$.{condition.key}') {ops_map[condition.op]} ?"
|
f"json_extract(s.attributes, '$.{condition.key}') {ops_map[condition.op.value]} ?"
|
||||||
for condition in attribute_filters
|
for condition in attribute_filters
|
||||||
]
|
]
|
||||||
params = [condition.value for condition in attribute_filters]
|
params = [condition.value for condition in attribute_filters]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue