Updates the active provider version for an assistant. Use this after creating a provider with Create assistant provider.
Parameters
Configuration for the client connection.
request
UpdateAssistantVersionRequest
required
Provider version to promote.
Provider version ID to make active.
Provider type for the version. Use MODEL, AGENTKIT, or WEBSOCKET.
Usage
import {
ConnectionConfig,
UpdateAssistantVersion,
UpdateAssistantVersionRequest,
} from "@rapidaai/react";
const auth = ConnectionConfig.WithDebugger({
authorization: "AUTHORIZATION_TOKEN_PLACEHOLDER",
userId: "AUTH_ID_PLACEHOLDER",
projectId: "PROJECT_ID_PLACEHOLDER",
});
const connectionCfg = ConnectionConfig.DefaultConnectionConfig(auth);
const request = new UpdateAssistantVersionRequest();
request.setAssistantid("ASSISTANT_ID_PLACEHOLDER");
request.setAssistantproviderid("PROVIDER_VERSION_ID_PLACEHOLDER");
request.setAssistantprovider("AGENTKIT");
const response = await UpdateAssistantVersion(connectionCfg, request);
console.dir(response.toObject());
Response
Numeric status code for the operation.
Indicates whether the operation was successful.
Updated assistant with the active provider version.
Error details when the operation fails.