Code development platform for open source projects from the European Union institutions 🔵 EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content

GPT@JRC API

New namespace with prefix /v1/rag: GET /info Response:

  • serviceName: The name or identifier of the service.
  • serviceDescription: A brief description of the service's purpose and capabilities.
  • version: The current version of the service.
  • status: The current operational status of the service (enum: "ok", "degraded", "down").
  • uptime: The amount of time the service has been running since its last restart. In seconds.
  • timestamp: The time at which the information was generated.

POST /query Request:

  • query: all the context of the chat (summarised)
  • raw_query: A string representing the user's last query.
  • max_characters: An integer specifying the maximum number of characters for each response object
  • chat_id: this is the 32-bit identifier (UUID4) of the chat Response:
{
“documents”: QueryResponse[] /* [
 {
   “metadata”: dict // {
     ‘title’ (mandatory): String // ‘Understanding REST’,
     ‘date’ (mandatory): String // ’01012023’
     ‘fragment’ (mandatory): Boolean // True
     ‘authors’ (optional): string
     ‘language’ (mandatory): string
     ‘type’ (mandatory): String
     ‘abstract’ (optional): string
     ‘id’ (optional): string // ’https://dx.doi.org/10.2760/19269’
     ‘URL’ (optional): string // ‘https://loren.ipsump/document1’
     ‘fragment_location’ (optional): String // ‘Page 4’
      },
    “document_content”: str
    “score”: float // 0.75
  }
 ] */
}