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 conversations to retrieve.
Source filter for conversations.
Usages
from rapida import (
ConnectionConfig,
GetAssistantConversationRequest,
get_assistant_conversation,
)
from pprint import pprint
connection_config = ConnectionConfig.default_connection_config(
ConnectionConfig.with_sdk("{rapida-api-key}")
)
response = get_assistant_conversation(
client_cfg=connection_config,
request=GetAssistantConversationRequest(
id="{assistant_conversation_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 all conversations for an assistant
response, err := clients.GetAllAssistantConversation(context.Background(), connectionConfig, &rapida_proto.GetAllAssistantConversationRequest{
AssistantId: 3456789876541212,
Paginate: &rapida_proto.Paginate{
Page: 0,
PageSize: 20,
},
// Optional: Apply 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,
GetAssistantConversation,
GetAssistantConversationRequest,
} from "@rapidaai/nodejs";
(async () => {
const connectionCfg = ConnectionConfig.DefaultConnectionConfig(
ConnectionConfig.WithSDK({
ApiKey: process.env.RAPIDA_PROJECT_CREDENTIAL,
})
);
getAssistantConversation(connectionCfg, "3456789876541212", "567898765456788765", [
{ field: "metadata" },
]);
})();
async function getAssistantConversation(connectionCfg, assistantId, conversationId, fields) {
const request = new GetAssistantConversationRequest();
request.setAssistantId(assistantId);
request.setAssistantConversationId(conversationId);
request.setSelectors(fields);
try {
const response =
await GetAssistantConversation(connectionCfg, request);
console.log("Assistant Conversation Response:", response.toObject());
} catch (error) {
console.error("Error with GetAssistantConversation call:", error);
}
}
Response
Numeric status code for the operation.
Indicates whether the operation was successful.
Array of assistant conversations.
Show child attributes
Show child attributes
Unique identifier for the conversation.
Identifier of the user participating in the conversation.
Identifier of the assistant in the conversation.
Name or title of the conversation.
Associated project identifier.
Associated organization identifier.
Source platform or origin of the conversation.
External identifier for the conversation.
Current status of the conversation.
Direction of the conversation flow.
User information for the conversation participant.
Identifier for the assistant provider model used.
Array of messages within the conversation.
Show child attributes
Show child attributes
Unique identifier for the message.
External message identifier.
Parent conversation identifier.
Associated assistant identifier.
Model identifier used for this message.
User’s request message.
Assistant’s response message.
Source platform of the message.
Status of the message.
Array of suggested follow-up questions.
Processing stages for the message.
Performance metrics for the message.
Additional metadata for the message.
Identifier of the message creator.
Identifier of the last updater.
Timestamp when the message was created.
Timestamp when the message was last updated.
Array of conversation contexts.
Performance metrics for the conversation.
Additional metadata for the conversation.
Arguments passed to the conversation.
Configuration options for the conversation.
Identifier of the conversation creator.
Identifier of the last updater.
Timestamp when the conversation was created.
Timestamp when the conversation was last updated.