(string)
| 79 | # input: prompt template without conversation history variable |
| 80 | # output: same prompt template with conversation history variable appended to the end of the system prompt |
| 81 | def add_variable(string): |
| 82 | formated_string = string.replace( |
| 83 | "{{~/system}}", "{{ ConversationHistory }}{{~/system}}" |
| 84 | ) |
| 85 | return formated_string |
| 86 | |
| 87 | |
| 88 | log = logging.getLogger(__name__) |