Create a query
Libraria API
Create a query
Given a query and an optional conversation id, get a response from your library
POST
Create a query
Documentation Index
Fetch the complete documentation index at: https://docs.libraria.ai/llms.txt
Use this file to discover all available pages before exploring further.
Parameters
The ID of the library you are going to ask a question
Body
The question you will make to the library.
Optional. Use this for a continuation of the conversation. You will receive a conversation id on the first query you send.
Optional. Whether or not you want to receive a streamed response. Default value is False.
Response
The response will vary according to the value of thestreaming attribute.
Non-streamed response
Whenstreaming is equal to false the response will be a JSON object containing the following fields
The response from the library for the query provided in the request body
Optional. Use this in follow-up requests for a continuation of the conversation. You will receive a conversation id on the first query you send.
A map containing data used to generate the query response. It provides additional sources of information to the reply.
Streamed response
Whenstreaming is equal to true the response is sent as a series of chunk where each of them will be a JSON object.
Specifies the type of the chunk that is being sentPossible values are: initializing, token, response, done
It only appears when
type == token.It represents the token that is currently being sent as part of a partial response.
If you concatenate all tokens you will have the complete response.It only appears when
type == response.A json object containing the final response and metadata for the gptQuery.
