Python
from opperai import Opper opper = Opper(http_bearer="YOUR_API_KEY") # List all knowledge bases with pagination knowledge_bases = opper.knowledge.list(offset=0, limit=20) print(f"Total knowledge bases: {knowledge_bases.meta.total_count}") print(f"Showing {len(knowledge_bases.data)} knowledge bases:") for kb in knowledge_bases.data: print(f"- {kb.name} (ID: {kb.id})") print(f" Embedding model: {kb.embedding_model}") print(f" Created: {kb.created_at}") print("---")
{ "meta": { "total_count": 1 }, "data": [ { "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "name": "<string>", "created_at": "2023-11-07T05:31:56Z", "embedding_model": "<string>" } ] }
List all knowledge bases for the current project
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
The offset to start the list from
x >= 0
The number of knowledge bases to return
1 <= x <= 100
Successful Response
Metadata about the response
Show child attributes
Total number of items in the collection
1
List of items returned in the response