For more authentication options, see: https://doc.rapida.ai/api-reference/authentication
Parameters
ConnectionConfig
required
Configuration for the client connection.
GetAllAssistantToolRequest
required
Show child attributes
Show child attributes
uint64
required
The unique identifier of the assistant whose tools to retrieve.
Paginate
Usage
from rapida import (
ConnectionConfig,
GetAssistantToolRequest,
get_assistant_tool,
)
from pprint import pprint
connection_config = ConnectionConfig.default_connection_config(
ConnectionConfig.with_sdk("{rapida-api-key}")
)
response = get_all_assistant_tool(
client_cfg=connection_config,
request=GetAllAssistantToolRequest(
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 assistant tools with pagination
response, err := clients.GetAllAssistantTool(context.Background(), connectionConfig, &rapida_proto.GetAllAssistantToolRequest{
AssistantId: 3456789876541212,
Paginate: &rapida_proto.Paginate{
Page: 0,
PageSize: 20,
},
// Optional: Add filtering 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,
GetAssistantTool,
GetAssistantToolRequest,
} from "@rapidaai/nodejs";
(async () => {
const connectionCfg = ConnectionConfig.DefaultConnectionConfig(
ConnectionConfig.WithSDK({
ApiKey: process.env.RAPIDA_PROJECT_CREDENTIAL,
})
);
getAssistantTool(connectionCfg, 45678903456789);
})();
async function getAssistantTool(connectionCfg, assistantId, toolId) {
const request = new GetAssistantToolRequest();
request.setAssistantId(assistantId);
request.setId(toolId);
try {
const response = await GetAssistantTool(connectionCfg, request);
console.log("Assistant Tool Response:", response.toObject());
} catch (error) {
console.error("Error with GetAssistantTool call:", error);
}
}
Response
int32
Numeric status code for the operation.
boolean
Indicates whether the operation was successful.
AssistantTool[]
Array of assistant tools.
Show child attributes
Show child attributes
uint64
Unique identifier for the assistant tool.
uint64
Identifier of the assistant that owns this tool.
string
Name of the assistant tool.
string
Description of the tool’s functionality.
Struct
Tool fields configuration as a structured object.
string
Method used for tool execution.
Metadata[]
Array of execution configuration options.
string
Current status of the tool.
timestamp
Timestamp when the tool was created.
timestamp
Timestamp when the tool was last updated.
Paginated
Pagination information for the results.