For more authentication options, see: https://doc.rapida.ai/api-reference/authentication
Parameters
Configuration for the client connection.
Show child attributes
Show child attributes
The unique identifier of the assistant whose knowledge bases to retrieve.
Usage
from rapida import (
ConnectionConfig,
GetAllAssistantKnowledgeRequest,
get_all_assistant_knowledge,
)
from pprint import pprint
connection_config = ConnectionConfig.default_connection_config(
ConnectionConfig.with_sdk("{rapida-api-key}")
)
response = get_all_assistant_knowledge(
client_cfg=connection_config,
request=GetAllAssistantKnowledgeRequest(
assistantId="{assistant_id}",
paginate=Paginate(page=0, pageSize=20),
# criterias=[Criteria(key="KEY", value="VALUE", logic="should")],
),
)
pprint(response)
import (
"context"
"fmt"
"os"
clients "github.com/rapidaai/rapida-go/rapida/clients"
rapida_proto "github.com/rapidaai/rapida-go/rapida/clients/protos"
connections "github.com/rapidaai/rapida-go/rapida/connections"
)
func main() {
// Configure client connection using RAPIDA_PROJECT_CREDENTIAL environment variable
connectionConfig := connections.
DefaultconnectionConfig(connections.WithSDK(os.Getenv("RAPIDA_PROJECT_CREDENTIAL")))
// Retrieve all knowledge bases for an assistant
response, err := clients.GetAllAssistantKnowledge(context.Background(), connectionConfig, &rapida_proto.GetAllAssistantKnowledgeRequest{
AssistantId: 3456789876541212,
Paginate: &rapida_proto.Paginate{
Page: 0,
PageSize: 20,
},
// Optional: Add search criteria
// Criterias: []*rapida_proto.Criteria{{
// Key: "status",
// Value: "active",
// Logic: "must",
// }},
})
if err != nil {
fmt.Printf("Error while making call using rapida: %+v\n", err)
return
}
// Print the response
fmt.Printf("Rapida calling response: %+v\n", response)
}
import {
ConnectionConfig,
Paginate,
GetAllAssistantKnowledge,
GetAllAssistantKnowledgeRequest,
} from "@rapidaai/nodejs";
(async () => {
const connectionCfg = ConnectionConfig.DefaultConnectionConfig(
ConnectionConfig.WithSDK({
ApiKey: process.env.RAPIDA_PROJECT_CREDENTIAL,
})
);
getAllAssistantKnowledge(connectionCfg, 56789678987890121, 0, 20);
})();
async function getAllAssistantKnowledge(connectionCfg, assistantId, page = 0, pageSize = 20) {
const pagination = new Paginate();
pagination.setPage(page);
pagination.setPageSize(pageSize);
const request = new GetAllAssistantKnowledgeRequest();
request.setAssistantId(assistantId);
request.setPaginate(pagination);
try {
const response = await GetAllAssistantKnowledge(connectionCfg, request);
console.log("All Assistant Knowledge Response:", response.toObject());
} catch (error) {
console.error("Error with GetAllAssistantKnowledge call:", error);
}
}
Response
Numeric status code for the operation.
Indicates whether the operation was successful.
Array of assistant knowledge configurations.
Show child attributes
Show child attributes
Unique identifier for the assistant knowledge mapping.
Identifier of the associated knowledge base.
Whether reranking is enabled for this knowledge base.
Number of top results to retrieve from the knowledge base.
Minimum similarity score threshold for results.
Detailed information about the knowledge base.
Show child attributes
Show child attributes
Unique identifier for the knowledge base.
Name of the knowledge base.
Description of the knowledge base purpose.
Visibility setting of the knowledge base.
Language setting for the knowledge base.
Identifier of the embedding model provider.
Name of the embedding model provider.
Array of embedding model configuration options.
Current status of the knowledge base.
Identifier of the knowledge base creator.
User object of the knowledge base creator.
Identifier of the last updater.
User object of the last updater.
Timestamp when the knowledge base was created.
Timestamp when the knowledge base was last updated.
Associated organization identifier.
Associated project identifier.
Organization details associated with the knowledge base.
Tag information associated with the knowledge base.
Number of documents in the knowledge base.
Total token count in the knowledge base.
Total word count in the knowledge base.
Method used for retrieving information from the knowledge base.
Identifier of the reranker model provider.
Name of the reranker model provider.
Array of reranker configuration options.
Timestamp when the assistant knowledge mapping was created.
Timestamp when the assistant knowledge mapping was last updated.
Current status of the assistant knowledge mapping.