{
    "swagger": "2.0",
    "info": {
        "description": "Chat2Query API",
        "title": "Chat2Query API",
        "contact": {},
        "version": "1.0"
    },
    "host": "127.0.0.1:11000",
    "basePath": "/api/v1/dataservices/central",
    "paths": {
        "/orgs/:org_id/projects/:project_id/apps/:app_id/chat2query/log": {
            "get": {
                "description": "Get Chat2Query logs",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "chat2query"
                ],
                "summary": "Get Chat2Query logs",
                "parameters": [
                    {
                        "name": "org_id",
                        "in": "path",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "project_id",
                        "in": "path",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "start",
                        "in": "query",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "end",
                        "in": "query",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "request_id",
                        "in": "query",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "question",
                        "in": "query",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "cluster_id",
                        "in": "query",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "database",
                        "in": "query",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/GetChat2QueryLogResp"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "GetChat2QueryLogResp": {
            "type": "object",
            "properties": {
                "has_more": {
                    "type": "boolean"
                },
                "logs": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/Chat2QueryLog"
                    }
                }
            }
        },
        "Chat2QueryLog": {
            "type": "object",
            "properties": {
                "type": {
                    "type": "string"
                },
                "log_time": {
                    "type": "integer"
                },
                "status": {
                    "type": "string"
                },
                "request_id": {
                    "type": "string"
                },
                "start_at": {
                    "type": "integer"
                },
                "session_id": {
                    "type": "string"
                },
                "data_summary_id": {
                    "type": "integer"
                },
                "cluster_id": {
                    "type": "string"
                },
                "database": {
                    "type": "string"
                },
                "token_count": {
                    "type": "integer"
                },
                "input": {
                    "type": "object",
                    "properties": {
                        "feedback": {
                            "type": "string"
                        },
                        "question": {
                            "type": "string"
                        },
                        "sql_generate_mode": {
                            "type": "string"
                        }
                    }
                },
                "output": {
                    "type": "object",
                    "properties": {
                        "chart_options": {
                            "type": "object"
                        },
                        "data": {
                            "type": "object"
                        },
                        "sql": {
                            "type": "string"
                        },
                        "sql_error": {
                            "type": "string"
                        },
                        "status": {
                            "type": "string"
                        },
                        "task_id": {
                            "type": "string"
                        },
                        "type": {
                            "type": "string"
                        }
                    }
                },
                "settings": {
                    "type": "object",
                    "properties": {
                        "language_code": {
                            "type": "string"
                        },
                        "llm_api_key": {
                            "type": "string"
                        },
                        "llm_model": {
                            "type": "string"
                        }
                    }
                },
                "recalled_knowledge_data": {
                    "type": "object"
                }
            }
        }
    }
}
