get_conversation_title {PacketLLM} | R Documentation |
Gets the title of the conversation with the given ID
Description
Retrieves the title associated with a specific conversation ID.
Usage
get_conversation_title(id)
Arguments
id |
Character string. The ID of the conversation whose title is requested. |
Value
Character string or NULL
. The title of the conversation associated
with the specified id
. Returns NULL
if the conversation does not exist.
Returns a placeholder string like ‘[No Title - ID: ...]’ if the title
field happens to be NULL
internally (should not normally occur).
Examples
# Setup
reset_history_manager()
conv_title_id1 <- create_new_conversation(title = "Specific Title")
conv_title_id2 <- create_new_conversation() # Default title generated
# Get title by ID
print(paste("Title for ID1:", get_conversation_title(conv_title_id1)))
print(paste("Title for ID2:", get_conversation_title(conv_title_id2)))
# Get title for non-existent ID
print(paste("Title for non-existent:", get_conversation_title("bad_id"))) # NULL
# Clean up
reset_history_manager()
[Package PacketLLM version 0.1.0 Index]