pups_1994
03/30/2024, 3:27 PMpups_1994
03/31/2024, 4:48 AMpups_1994
03/31/2024, 4:50 AMnewConversation= true in my test vars in the first message per conversation. And then some code like given in this picture.
But the problem is that the _conversation is getting set to [] only for that particular test (i.e a message in multi turn) but i want to reset it globally. (so that in the next message for the same thread the first msg is present not all the previous messages).
https://cdn.discordapp.com/attachments/1223654806963486821/1223856905903149158/image.png?ex=661b6090&is=6608eb90&hm=ef338ea4c0519d52ea3d2f8e25ebec504e6b82d786a87865290d46caf050adb9&pups_1994
03/31/2024, 4:50 AM[
{
"role": "system",
"content": "{{system_message}}"
},
{% if newConversation %}
{% set _conversation = [] %}
{% endif %}
{% for completion in _conversation %}
{
"role": "user",
"content": "{{ completion.prompt[completion.prompt.length - 1].content }}"
},
{
"role": "assistant",
"content": "{{ completion.output }}"
},
{% endfor %}
{
"role": "user",
"content": "{{ question }}"
}
]
In test format if you wanna suggest an edit easilypups_1994
03/31/2024, 7:29 PMpups_1994
03/31/2024, 7:30 PMthreads feature of OAI, i dont want to lock into that, so i use the chat api (with my code providing the chat history).pups_1994
03/31/2024, 7:31 PMian
03/31/2024, 9:11 PMthreads specific, but for anyone who wants to maintain a conversation historypups_1994
04/01/2024, 4:51 AMpups_1994
04/02/2024, 2:10 PMmtoledo2
06/20/2024, 5:48 PMmtoledo2
06/20/2024, 6:42 PMian
06/23/2024, 5:54 AM