안녕하세요.
아래와 같이 API 호출시에 대화 내용을 기억하고 이어서 대화의 흐름에 따라서 답변을 제공하는게 안되는 것 같아서 문의 드립니다.
어떻게 해야지 이전 대화 내용을 기억하고 흐름에 맞게 답변을 할 수 있나요??
curl --location --request POST 'https://clovastudio.stream.ntruss.com/testapp/v1/chat-completions/HCX-003' \
--header 'Authorization: Bearer {API Key}' \
--header 'X-NCP-CLOVASTUDIO-REQUEST-ID: {Request ID}' \
--header 'Content-Type: application/json' \
--header 'Accept: text/event-stream' \
--data '{
"topK" : 0,
"includeAiFilters" : true,
"maxTokens" : 256,
"temperature" : 0.5,
"messages" : [ {
"role" : "system",
"content" : "test"
}, {
"role" : "user",
"content" : "바나나"
}, {
"role" : "assistant",
"content" : "바나나는 열대과일 중 하나로, 맛이 달콤하고 영양이 풍부한 과일입니다."
}, {
"role" : "user",
"content" : "그러면 얼마야?"
}, {
"role" : "assistant",
"content" : "바나나의 가격은 구매 장소, 브랜드, 중량 등에 따라 다를 수 있습니다."
}, {
"role" : "user",
"content" : "어디서 살 수 있어?"
}, {
"role" : "assistant",
"content" : "바나나는 다양한 장소에서 구매하실 수 있습니다."
} ],
"stopBefore" : [ ],
"repeatPenalty" : 5.0,
"topP" : 0.8
}'