For more authentication options, see: https://doc.rapida.ai/api-reference/authentication
Parameters
ConnectionConfig
required
Configuration for the client connection.
GetAllAssistantConversationRequest
required
Show child attributes
Show child attributes
uint64
required
The unique identifier of the assistant whose conversations to retrieve.
Paginate
Criteria[]
Source
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
int32
Numeric status code for the operation.
boolean
Indicates whether the operation was successful.
AssistantConversation[]
Array of assistant conversations.
Show child attributes
Show child attributes
uint64
Unique identifier for the conversation.
uint64
Identifier of the user participating in the conversation.
uint64
Identifier of the assistant in the conversation.
string
Name or title of the conversation.
uint64
Associated project identifier.
uint64
Associated organization identifier.
string
Source platform or origin of the conversation.
string
External identifier for the conversation.
string
Current status of the conversation.
string
Direction of the conversation flow.
User
User information for the conversation participant.
uint64
Identifier for the assistant provider model used.
AssistantConversationMessage[]
Array of messages within the conversation.
Show child attributes
Show child attributes
uint64
Unique identifier for the message.
string
External message identifier.
uint64
Parent conversation identifier.
uint64
Associated assistant identifier.
uint64
Model identifier used for this message.
Message
User’s request message.
Message
Assistant’s response message.
string
Source platform of the message.
string
Status of the message.
string[]
Array of suggested follow-up questions.
AssistantMessageStage[]
Processing stages for the message.
Metric[]
Performance metrics for the message.
Metadata[]
Additional metadata for the message.
uint64
Identifier of the message creator.
uint64
Identifier of the last updater.
timestamp
Timestamp when the message was created.
timestamp
Timestamp when the message was last updated.
AssistantConversationContext[]
Array of conversation contexts.
Metric[]
Performance metrics for the conversation.
Metadata[]
Additional metadata for the conversation.
Argument[]
Arguments passed to the conversation.
Metadata[]
Configuration options for the conversation.
AssistantConversationRecording[]
uint64
Identifier of the conversation creator.
uint64
Identifier of the last updater.
timestamp
Timestamp when the conversation was created.
timestamp
Timestamp when the conversation was last updated.
Paginated