Skip to content

Instantly share code, notes, and snippets.

@taranjeet
Created November 10, 2023 19:41
Show Gist options
  • Save taranjeet/eb0b0d30d61d6753dd5d76a573942f67 to your computer and use it in GitHub Desktop.
Save taranjeet/eb0b0d30d61d6753dd5d76a573942f67 to your computer and use it in GitHub Desktop.
OpenAPI spec for Langchain RAG pipeline
{
"openapi": "3.1.0",
"info": {
"title": "Query Processing API",
"description": "API for processing and responding to text-based queries.",
"version": "v1.0.0"
},
"servers": [
{
"url": "https://app.embedchain.ai/api/v1/pipelines/9879fb1a-aea6-42da-aeea-1cece39175f2"
}
],
"paths": {
"/context/": {
"post": {
"summary": "Submit a query for processing",
"operationId": "submitQuery",
"description": "Sends a text query to be processed and responded to.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "The text query to be processed."
},
"count": {
"type": "integer",
"description": "The number of responses to return.",
"default": 10
}
}
}
}
}
},
"responses": {
"200": {
"description": "Successful response with the processed data.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"responses": {
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"context": {
"type": "string"
},
"source": {
"type": "string"
},
"document_id": {
"type": "string"
}
}
}
}
}
}
}
}
}
},
"400": {
"description": "Bad request if the request parameters are incorrect."
},
"401": {
"description": "Unauthorized if the authentication token is missing or invalid."
},
"500": {
"description": "Internal server error."
}
}
}
}
},
"components": {
"schemas": {},
"securitySchemes": {
"ApiKeyAuth": {
"type": "apiKey"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment