Jump to content

안녕하세요. API이용시 RETURN VALUE 문의드립니다.


Recommended Posts

안녕하세요.

API를 이용하여 개인적으로 테스트(.NET) 를 해보고 있는데 

요청시 Return value가 아래와 같이 나오는데  결과만 따로 받는 방법이 있을까요.

Q: 만유인력법칙은?

 

 

/*

id:f13fc2ca-687a-423d-8e43-d902740b69d7
event:token
data:{"message":{"role":"assistant","content":"-"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:0533a1a3-5eb2-4e0c-918d-79d7e1322fbf
event:token
data:{"message":{"role":"assistant","content":" 만"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:aa47dc61-97f4-477d-9392-2dad70002b7f
event:token
data:{"message":{"role":"assistant","content":"유"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:8d24be38-3f5b-4bad-842f-6c07e0d15813
event:token
data:{"message":{"role":"assistant","content":"인력"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:5b81779a-79a5-4108-9758-6fcac9c4a892
event:token
data:{"message":{"role":"assistant","content":" 법칙"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:c499a511-c917-4dda-9056-71a04630c4fd
event:token
data:{"message":{"role":"assistant","content":"은"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:77408895-81cf-492a-8754-5b8fe3241db7
event:token
data:{"message":{"role":"assistant","content":" 질량"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:cf906dd8-de74-46c1-8601-9b0e4225a8dd
event:token
data:{"message":{"role":"assistant","content":"을"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:fa3dc30c-131c-4220-a9b6-5e107aa8b540
event:token
data:{"message":{"role":"assistant","content":" 가진"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:3726f974-8410-46c0-a1dd-cec1627d1206
event:token
data:{"message":{"role":"assistant","content":" 모든"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:df20fd5f-5611-46b7-a6cf-ee8aa783e829
event:token
data:{"message":{"role":"assistant","content":" 물체"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:0cc4638f-3881-4399-a357-6dac0baa02a3
event:token
data:{"message":{"role":"assistant","content":" 사이"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:854b0d5b-c202-476c-a725-951f8051e0f5
event:token
data:{"message":{"role":"assistant","content":"에"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:8523eead-8ef0-49bf-9842-bec0875d48f5
event:token
data:{"message":{"role":"assistant","content":" 작용"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:b34e916e-f93b-4c86-9dbf-d6a7c6289c38
event:token
data:{"message":{"role":"assistant","content":"하는"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:4804a852-3bc1-4b4a-9e8f-813eb0c3efaa
event:token
data:{"message":{"role":"assistant","content":" 인력"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:70251d83-6027-4144-a010-4f5aa3e79b6a
event:token
data:{"message":{"role":"assistant","content":"을"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:560de01b-8413-44c3-bd5f-4fd26e5f54b1
event:token
data:{"message":{"role":"assistant","content":" 설명"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:15522575-b9cc-447b-9595-900be06ceb8d
event:token
data:{"message":{"role":"assistant","content":"하는"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:f49aeedf-fd5f-4127-9ac9-978aeb7a9e0c
event:token
data:{"message":{"role":"assistant","content":" 법칙"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:5d4bd3e3-2925-4b00-b370-0e4294b7c7bc
event:token
data:{"message":{"role":"assistant","content":"으로"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:55b57db8-4d69-4c68-81ce-454c8ba94dd9
event:token
data:{"message":{"role":"assistant","content":","},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:f7aecd7f-1f7d-4194-84af-07421ad88c40
event:token
data:{"message":{"role":"assistant","content":" 뉴"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:5f924add-43b1-42d4-8e4a-7547aa580a1c
event:token
data:{"message":{"role":"assistant","content":"턴"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:58f91c85-4ab4-4acb-b8e0-c8e82974b5f6
event:token
data:{"message":{"role":"assistant","content":"이"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:0daf177d-890f-4ff4-bda2-479047c99ee0
event:token
data:{"message":{"role":"assistant","content":" 16"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:1105b792-d712-4e27-bafe-98576fdc16dc
event:token
data:{"message":{"role":"assistant","content":"87"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:8a273fad-6c82-44e2-8b66-040671de2abb
event:token
data:{"message":{"role":"assistant","content":"년"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:330ca633-ed3c-4b7d-b39e-2ac907ac8c39
event:token
data:{"message":{"role":"assistant","content":"에"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:abdb217b-6aca-4877-8b48-944a556c5127
event:token
data:{"message":{"role":"assistant","content":" 발표"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:2ff9a325-cb36-4a41-b3ec-f724f58af48b
event:token
data:{"message":{"role":"assistant","content":"한"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:ab9a1f3c-4f7e-4386-9297-32b5cd46badb
event:token
data:{"message":{"role":"assistant","content":" 것"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:3627fa55-fb63-4a39-93ac-6b6ec47cec75
event:token
data:{"message":{"role":"assistant","content":"입니다"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:5468e8d8-aa9f-4084-83fd-0e7de1459b4a
event:token
data:{"message":{"role":"assistant","content":"."},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:2b1b2ca8-2227-446b-9dc8-ca2ba0542da5
event:token
data:{"message":{"role":"assistant","content":"\n"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:444ee379-52cf-4b94-a6a9-bbe56577a9b0
event:token
data:{"message":{"role":"assistant","content":"\n"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:6e2b8efe-e35b-4d45-b016-2b7324086e04
event:token
data:{"message":{"role":"assistant","content":"-"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:f8013e0e-cd69-4a1c-b1bd-cdb424814612
event:token
data:{"message":{"role":"assistant","content":" 두"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:019bf712-e151-42be-bbe4-4f2b65017ae3
event:token
data:{"message":{"role":"assistant","content":" 물체"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:766ada2f-e5c3-470f-a09b-67a897c81aec
event:token
data:{"message":{"role":"assistant","content":" 사이"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:280011f7-edc4-46e6-83ed-c1187e705d33
event:token
data:{"message":{"role":"assistant","content":"의"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:cccefd3e-65a3-40a2-ac52-84a5eb850bdf
event:token
data:{"message":{"role":"assistant","content":" 거리"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:128785e2-b1ed-4e00-8e61-ec6eabccb715
event:token
data:{"message":{"role":"assistant","content":" 제곱"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:19534b40-823d-49c4-861f-538ccd53be23
event:token
data:{"message":{"role":"assistant","content":"에"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:c64da871-7082-4dbf-847c-ad2c29e0c7ac
event:token
data:{"message":{"role":"assistant","content":" 반"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:94da758a-56c1-4997-8b39-47aac98fe613
event:token
data:{"message":{"role":"assistant","content":"비례"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:be59fefa-fcc7-4e1e-8aae-92a312aa7f66
event:token
data:{"message":{"role":"assistant","content":"하고"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:2b5b1ebc-9730-412e-9142-5fbbc65797e5
event:token
data:{"message":{"role":"assistant","content":","},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:4a8db235-5c3f-47c8-810a-cae647aabecb
event:token
data:{"message":{"role":"assistant","content":" 두"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:fa870594-2a24-40ea-ac2f-485c7eb89cfe
event:token
data:{"message":{"role":"assistant","content":" 물체"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:c9fe79fc-3138-476a-a73e-e88d02a658f7
event:token
data:{"message":{"role":"assistant","content":"의"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:16829667-5c18-47d3-b3eb-2d03afbcfde5
event:token
data:{"message":{"role":"assistant","content":" 질량"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:5fd0bbc6-075b-4bb7-a279-e25adf300107
event:token
data:{"message":{"role":"assistant","content":"의"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:442f4ad9-bd71-46d5-b66f-3d1122e3194d
event:token
data:{"message":{"role":"assistant","content":" 곱"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:7d707bc8-f4a9-4d4f-914f-b1d31fccaee4
event:token
data:{"message":{"role":"assistant","content":"에"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:4e7f642d-c527-42e2-812c-ceb2c0f63fdf
event:token
data:{"message":{"role":"assistant","content":" 비례"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:4418bbae-2ffb-4c43-8900-a89b7f424a21
event:token
data:{"message":{"role":"assistant","content":"합니다"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:e3bf1339-9eb9-4248-9c2e-662edb23b659
event:token
data:{"message":{"role":"assistant","content":"."},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:d931a207-0f83-4deb-8889-a9a9399c1b1e
event:token
data:{"message":{"role":"assistant","content":" 이를"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:63b21df3-0a0d-4a33-9cb0-bbb2dc7e1d1c
event:token
data:{"message":{"role":"assistant","content":" 수식"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:a60bca3f-4356-44fe-a020-66d156c9c3b9
event:token
data:{"message":{"role":"assistant","content":"으로"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:47ddeba7-e6d5-4dda-8fc8-99577f4eff66
event:token
data:{"message":{"role":"assistant","content":" 나타"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:739c16dc-1d71-4092-b9f5-54cdb1548c97
event:token
data:{"message":{"role":"assistant","content":"내면"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:6d314214-4f71-44bb-a45e-f7037397511c
event:token
data:{"message":{"role":"assistant","content":" 다음"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:dac86041-b5b2-4394-9a9e-e57159713480
event:token
data:{"message":{"role":"assistant","content":"과"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:879225c4-2fa2-4faa-bade-e535244aa8ea
event:token
data:{"message":{"role":"assistant","content":" 같습니다"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:cf763bf8-3721-4469-b3de-4d52c5924ae8
event:token
data:{"message":{"role":"assistant","content":"."},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:dc72224d-eb17-4de7-bf57-554fa7dea886
event:token
data:{"message":{"role":"assistant","content":"\n"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:2b5ddb02-75e2-4dee-a59d-2714161afff4
event:token
data:{"message":{"role":"assistant","content":"\n"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:ee485345-6d86-476b-bf1b-88cd82fb3e27
event:token
data:{"message":{"role":"assistant","content":"F"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:f4466380-5e02-40e7-a234-c7a535b2f36b
event:token
data:{"message":{"role":"assistant","content":" ="},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:c007c582-7959-45cb-9488-5308aee53404
event:token
data:{"message":{"role":"assistant","content":" G"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:9d35edf8-4991-4642-8b99-0117e2d60c7e
event:token
data:{"message":{"role":"assistant","content":" *"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:fdb0bdb8-d013-4249-af73-87e1009d9526
event:token
data:{"message":{"role":"assistant","content":" ("},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:533b451a-25d2-498e-bfbd-556587a31f68
event:token
data:{"message":{"role":"assistant","content":"m"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:a5dab555-9e5a-4aa0-91ac-742163ca897a
event:token
data:{"message":{"role":"assistant","content":"1"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:135a3b4e-18ea-41a7-ad97-1ec5fd689b5e
event:token
data:{"message":{"role":"assistant","content":" *"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:36fff329-e0df-4192-87f6-97211e4a349a
event:token
data:{"message":{"role":"assistant","content":" m"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:76a15a68-c200-43d8-b736-ffe20e1dddb0
event:token
data:{"message":{"role":"assistant","content":"2"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:85212297-0825-4d5d-ab84-681064f76fc3
event:token
data:{"message":{"role":"assistant","content":")"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:c143f6de-850e-423c-bbff-c1a6a46780cf
event:token
data:{"message":{"role":"assistant","content":" /"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:ec370742-c8ab-4f0f-9c46-62f2fd89707d
event:token
data:{"message":{"role":"assistant","content":" r"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:ce8efcc1-8c9f-4796-b69f-b1a1d96ad88b
event:token
data:{"message":{"role":"assistant","content":"^"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:b82d6847-dda5-4261-aea1-bb25be41e8c5
event:token
data:{"message":{"role":"assistant","content":"2"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:a2ea06d2-a315-42f8-9f21-2fcf83d2d6f0
event:token
data:{"message":{"role":"assistant","content":"\n"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:ae8bdbbd-d829-4edf-856e-9d4cb6458869
event:token
data:{"message":{"role":"assistant","content":"\n"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:1b53e2a2-2823-4d03-bbbd-5501fac59a87
event:token
data:{"message":{"role":"assistant","content":"("},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:b742831f-b449-4002-931f-79a46044ead1
event:token
data:{"message":{"role":"assistant","content":"F"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:f5cb8aec-904d-47d3-be74-4509a90079ec
event:token
data:{"message":{"role":"assistant","content":":"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:df418224-cc78-46dc-97c2-402a4580c452
event:token
data:{"message":{"role":"assistant","content":" 만"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:9776b7df-7e4e-46e8-b3e1-4f4ff68a813f
event:token
data:{"message":{"role":"assistant","content":"유"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:cb8791ba-a256-456a-ba5d-ffe02d8547dc
event:token
data:{"message":{"role":"assistant","content":"인력"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:10317085-24f6-4c0e-9327-a57ccae523f0
event:token
data:{"message":{"role":"assistant","content":","},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:62419611-29cd-4f42-8eb7-19526d956460
event:token
data:{"message":{"role":"assistant","content":" G"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:ff3ce6b6-bca7-419f-8139-221342688b11
event:token
data:{"message":{"role":"assistant","content":":"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:1fb78d8e-b63a-4384-b5a0-225b3d05bf8c
event:token
data:{"message":{"role":"assistant","content":" 중력"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:8f17947e-9815-41fd-8c82-c952ba6d2120
event:token
data:{"message":{"role":"assistant","content":" 상수"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:f4c2bc0d-235a-444b-897a-b0e4eddaae00
event:token
data:{"message":{"role":"assistant","content":","},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:0bb7e59f-825e-40fe-865f-528abc79861a
event:token
data:{"message":{"role":"assistant","content":" m"},"index":0,"inputLength":6,"outputLength":1,"stopReason":null}

id:2c2b111e-7115-4711-be64-e48d32997f3c
event:token
data:{"message":{"role":"assistant","content":"1"},"index":0,"inputLength":6,"outputLength":1,"stopReason":"length"}

id:4824d38f-4e3c-4307-9e45-ed9627b2dc85
event:result
data:{"message":{"role":"assistant","content":"- 만유인력 법칙은 질량을 가진 모든 물체 사이에 작용하는 인력을 설명하는 법칙으로, 뉴턴이 1687년에 발표한 것입니다.\n\n- 두 물체 사이의 거리 제곱에 반비례하고, 두 물체의 질량의 곱에 비례합니다. 이를 수식으로 나타내면 다음과 같습니다.\n\nF = G * (m1 * m2) / r^2\n\n(F: 만유인력, G: 중력 상수, m1"},"inputLength":6,"outputLength":101,"stopReason":"length","seed":2839760935}

id:445b8ee6-9a27-435f-9c10-7bfa8205fe08
event:signal
data:{"data":"[DONE]"}
 

*/

 

 

Edited by DevLee
링크 복사
다른 사이트에 공유하기

안녕하세요, @DevLee님, 클로바 스튜디오 담당입니다.

토큰 단위로 스트리밍 되는 것이 아니라, 출력 결과를 바로 받는 방법을 문의하신 것으로 이해했습니다.

Header의 text/event-stream을 N으로 요청하시면, 토큰 스트리밍이 아닌 형태로 응답 결과를 받을 수 있습니다.

가이드: https://api.ncloud-docs.com/docs/clovastudio-sendchatcompletionsbymodelname

추가 문의가 있으실 경우 언제든지 알려주세요.

감사합니다.

링크 복사
다른 사이트에 공유하기

@DevLee님, 네 맞습니다.

클로바 스튜디오의 플레이그라운드를 통해 HCX 모델을 이용하는 것과 Chat Completions API를 통해 HCX 모델을 이용하는 것과 동일합니다.

다만, LLM 특성상 요청마다 출력 결과가 달라질 수 있는 점을 말씀드립니다.

감사합니다.

링크 복사
다른 사이트에 공유하기

답변 감사합니다.

출력 결과가 달라질수 있어도 요청된 결과의 끝은 맺어져야 되지 않을까해서 다시 문의드립니다.

위에 첨부된 이미지를 보시면 내용이 끊기는 부분이 있네요.

링크 복사
다른 사이트에 공유하기

말씀해주신데로 MaxToken Value : 4096으로 한뒤 테스트 했는데 간헐적으로 긴 답변이 나올 시 문장이 짤리는 현상이 있는데

이러한 현상을 문의하신 내역이 따로 있으신지 궁금합니다.

아래이미지는 다른 환경에서 테스트한 결과 입니다.

 

image.png.4e470f8237f47574c492a6a38ad0cd74.png

링크 복사
다른 사이트에 공유하기

Posted (edited)

해결하였습니다. 다른코드를 적용하여 우선결과가 제대로 나오는 부분을 확인하였습니다.

 

사용해보고 기타문의 사항이 있을 시 글 남기도록 하겠습니다.

 

Edited by DevLee
  • Like 1
링크 복사
다른 사이트에 공유하기

게시글 및 댓글을 작성하려면 로그인 해주세요.



로그인
×
×
  • Create New...