For more authentication options, see: https://doc.rapida.ai/api-reference/authentication
Parameters
Configuration for the client connection.
Usage
from rapida import (
ConnectionConfig,
GetAssistantKnowledgeRequest,
get_assistant_knowledge,
)
from pprint import pprint
connection_config = ConnectionConfig.default_connection_config(
ConnectionConfig.with_sdk("{rapida-api-key}")
)
response = get_assistant_knowledge(
client_cfg=connection_config,
request=GetAssistantKnowledgeRequest(
id="{assistant_knowledge_id}", assistantId="{assistant_id}"
),
)
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 assistant knowledge configuration
response, err := clients.GetAssistantKnowledge(context.Background(), connectionConfig, &rapida_proto.GetAssistantKnowledgeRequest{
AssistantId: 3456789876541212,
Id: 567898765456788765,
})
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,
GetAssistantKnowledge,
GetAssistantKnowledgeRequest,
} from "@rapidaai/nodejs";
(async () => {
const connectionCfg = ConnectionConfig.DefaultConnectionConfig(
ConnectionConfig.WithSDK({
ApiKey: process.env.RAPIDA_PROJECT_CREDENTIAL,
})
);
getAssistantKnowledge(connectionCfg, 45678903456789, 12345676543211);
})();
async function getAssistantKnowledge(connectionCfg, assistantId, knowledgeId) {
const request = new GetAssistantKnowledgeRequest();
request.setAssistantId(assistantId);
request.setId(knowledgeId);
try {
const response = await GetAssistantKnowledge(connectionCfg, request);
console.log("Assistant Knowledge Response:", response.toObject());
} catch (error) {
console.error("Error with GetAssistantKnowledge call:", error);
}
}
Response
Numeric status code for the operation.
Indicates whether the operation was successful.
Detailed information about the assistant’s knowledge configuration.
Show child attributes
Show child attributes
Unique identifier for the assistant knowledge configuration.
Identifier of the associated knowledge base.
Whether the reranker is enabled for knowledge retrieval.
Maximum number of top results to retrieve from the knowledge base.
Minimum similarity score threshold for knowledge retrieval.
Detailed information about the associated knowledge base.
Show child attributes
Show child attributes
Unique identifier for the knowledge base.
Name of the knowledge base.
Description of the knowledge base.
Visibility setting of the knowledge base.
Language of the knowledge base content.
Identifier of the embedding model provider.
Name of the embedding model provider.
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.
Total number of documents in the knowledge base.
Total number of tokens in the knowledge base.
Total number of words in the knowledge base.
Method used for retrieving knowledge from the knowledge base.
Identifier of the reranker model provider.
Name of the reranker model provider.
Timestamp when the assistant knowledge configuration was created.
Timestamp when the assistant knowledge configuration was last updated.
Current status of the assistant knowledge configuration.