get_conversation_model {PacketLLM}R Documentation

Gets the model name for the conversation with the given ID

Description

Retrieves the name of the language model assigned to a specific conversation.

Usage

get_conversation_model(id)

Arguments

id

Character string. The ID of the conversation.

Value

Character string or NULL. The name of the OpenAI model assigned to the conversation with the specified id. Returns NULL if the conversation does not exist. Returns a fallback model name if the model field happens to be NULL internally.

Examples

# Setup
reset_history_manager()
conv_model_id <- create_new_conversation() # Uses default model from initialization

# Get the model for the conversation
model_name <- get_conversation_model(conv_model_id)
print(paste("Model for conversation:", model_name))

# Check a non-existent conversation
print(paste("Model for non-existent:", get_conversation_model("bad_id"))) # NULL

# Clean up
reset_history_manager()

[Package PacketLLM version 0.1.0 Index]