openapi: 3.0.2 info: title: VG GPT Plugin API description: A retrieval API for querying articles based on natural language queries and metadata. version: 1.0.1 servers: - url: https://gpt-plugin.vg.no paths: /similarity_search/vg_articles: post: summary: Query description: Pass the user question in full natural language. Break down complex questions into sub-questions. Refine results by criteria, e.g. time / source, don't do this often. Use this when asked about a particular topic or event. operationId: query_query_post requestBody: content: application/json: schema: $ref: "#/components/schemas/QueryRequest" required: true responses: "200": description: Successful Response content: application/json: schema: $ref: "#/components/schemas/QueryResponse" "401": description: Authentication failed content: application/json: schema: $ref: "#/components/schemas/APIError" "503": description: Query failed content: application/json: schema: $ref: "#/components/schemas/APIError" security: - HTTPBearer: [] /popular/vg_articles: post: summary: Get a list of most popular articles description: Returns the most popular articles from a given date to today. Default date is today, use the format 2023-08-29. Use this when asked about the latest news. operationId: get_popular_articles requestBody: content: application/json: schema: $ref: "#/components/schemas/PopularRequest" required: true responses: "200": description: Successful Response content: application/json: schema: $ref: "#/components/schemas/PopularResponse" "401": description: Authentication failed content: application/json: schema: $ref: "#/components/schemas/APIError" "503": description: Query failed content: application/json: schema: $ref: "#/components/schemas/APIError" security: - HTTPBearer: [] components: schemas: DocumentChunk: title: DocumentChunk type: object properties: source: title: Source type: string title: title: Title type: string published_at: title: Published at type: string text: title: Text type: string PopularChunk: title: PopularChunk type: object properties: age_in_hours: title: Age since published type: integer id: title: Article unique id type: string popularity: title: Popularity rank type: integer title: title: Article Title type: string QueryRequest: title: QueryRequest required: - query type: object properties: query: title: Query type: string QueryResponse: title: QueryResponse type: array items: $ref: '#/components/schemas/DocumentChunk' PopularRequest: title: PopularRequest required: - from_date type: object properties: from_date: title: Date type: string PopularResponse: title: PopularResponse type: array items: $ref: '#/components/schemas/PopularChunk' APIError: title: API Error type: object properties: error: title: Error message type: string securitySchemes: HTTPBearer: type: http scheme: bearer