ZBrain uses a knowledge base as the foundation for building LLM-based applications. Users can upload their data in any format, such as PDFs, Word documents or web pages, to create this knowledge base. The knowledge base is the source of your app's domain-specific information, allowing it to offer accurate and targeted responses.
Create knowledge base
To create a knowledge base on ZBrain, send a POST request to a given URL with their specific information. They ensure that the payload includes an optional description and the name of the knowledge base while confirming that the necessary headers are correctly incorporated.
{"responseData": {"name":"string","description":"string","tenantId":"string","createdBy":"string","_id":"string","addedOn": number,"modifiedOn": number },"message":"Knowledge base created successfully","success":true,"responseCode":200}
Get Knowledge bases
Using the provided ZBrain API, users can easily fetch their knowledge base data. By sending a GET request to the given URL and adjusting the 'limit' and 'skip' parameters, users can tailor the amount of data retrieved and its starting point, simplifying access to their specific knowledge base content.
On ZBrain, users have multiple options to create a knowledge base by importing information. They can import data from files such as PDF, TXT, CSV, DOCX, or XLSX, website links, or even through APIs. This approach enables users to gather and integrate relevant information into their knowledge base, feeding their AI applications with accurate and domain-specific data from diverse sources.
Using FILE
ZBrain allows users to create a knowledge base by importing files directly into the system using a specified API. Users can seamlessly import file types such as PDF, TXT, CSV, DOCX, or XLSX into their designated knowledge base by initiating a POST request to the provided URL, ensuring that the AI applications have direct access to the required domain-specific information.
When one seeks to construct a Zbrain knowledge base using a website, they must employ a certain web address or API. This process involves providing necessary details such as the knowledge base's identification, the import type (in this instance, a website), and the desired number of pages for indexing. Including the website URL from which the knowledge base will be created is crucial. Additionally, they must authenticate their request with their API key.
{"responseData": {"title":"string","summary":"string","knowledgeBaseId":"string","importedType":"string","status":"string","file": {"url":"string","path":"string","bucket":"string" },"document": {"url":"string","path":"string","bucket":"string" },"visitedPages": ["string"],"characters": number,"chunksCount": number,"_id":"string","input": object,"error": object,"addedOn": number,"modifiedOn": number,"charactersLimit": number },"message":"Knowledge base import added successfully","success":true,"responseCode":200}
Using API
When someone aims to construct a Zbrain knowledge base utilizing an API, they send specific data to a Zbrain web address. The information comprises the type of activity (API), a title for their data, and the data content itself, which should span at least 100 characters. They also need to include their API key for security purposes.
{"responseData": {"title":"string","summary":"string","knowledgeBaseId":"string","importedType":"string","status":"string","file": {"url":"string","path":"string","bucket":"string" },"document": {"url":"string","path":"string","bucket":"string" },"visitedPages": ["string"],"characters": number,"chunksCount": number,"_id":"string","input": object,"error": object,"addedOn": number,"modifiedOn": number,"charactersLimit": number },"message":"Knowledge base import added successfully","success":true,"responseCode":200}
Update Knowledge base
When a user wishes to update an existing knowledge base in Zbrain, they can utilize the following specific API, which sends a PUT request, along with their API key, to modify the knowledge base's name and description. Providing the correct knowledge base ID is important to ensure the updates are applied to the desired base.
{"responseData": {"name":"string","description":"string","tenantId":"string","createdBy":"string","_id":"string","addedOn": number,"modifiedOn": number },"message":"Information added successfully","success":true,"responseCode":200}
Delete Knowledge base
If a user wishes to delete a specific knowledge base in Zbrain, the following API is used, which sends a DELETE request to the designated URL, including the knowledge base's unique ID in the path. The request must also contain its API key in the header for authorization.
{"responseData":"Knowledge base deleted successfully","message":"Knowledge base deleted successfully","success":true,"responseCode":200}
Delete Import
If a user wishes to delete a specific knowledge base import in Zbrain, the following API is used, which sends a DELETE request to the designated URL, including the knowledge base import's unique ID in the body. The request must also contain its API key in the header for authorization.