prompt_from_history: Build prompt from chat history
Description
Build prompt from chat history
Usage
prompt_from_history(
chat_obj,
add_text = NULL,
add_role = "user",
start_turn_index = 1
)
Value
Formatted prompt string
Arguments
- chat_obj
Chat object
- add_text
Additional text to append
- add_role
Role for add_text ("user" or "assistant")
- start_turn_index
Starting turn index (default 1)