CLOVA-X icon indicating copy to clipboard operation
CLOVA-X copied to clipboard

Errorcode: 500

Open deliciouscat opened this issue 1 year ago • 3 comments

안녕하세요.

제가 가지고 있는 데이터셋에 대해 클로바의 벤치마크 성능을 측정하고자 하는데, Errorcode 500오류가 발생해서 문의를 드리고자 합니다. 코드는 다음과 같습니다.

import pandas as pd
from clovax import ClovaX
data = pd.read_csv('~/spam552_final_test_small.csv')

content = """8개의 class중 하나로 주어진 텍스트를 분류해줘. 이 분류는 텍스트 마이닝을 위한 전처리야.
Classes: [`생활광고`, `생활거래`, ... , `정상글`]
아래에는 few-shot 예제가 있어.

Text: (생략)
Class: `생활광고`

... (생략) ...

"""

c = ClovaX()
c.get_cookie("~/clova-x.naver.com_cookies.txt")
def clova_gen(text):
    return c.start(content + text)['text']

outs=[clova_gen(text) for text in data['제목']+'\n'+data['내용']]

이에 대한 전체 오류메세지가 다음과 같이 발생했습니다.

---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
Cell In[14], line 1
----> 1 outs=[clova_gen(text) for text in data['제목']+'\n'+data['내용']]

Cell In[14], line 1, in (.0)
----> 1 outs=[clova_gen(text) for text in data['제목']+'\n'+data['내용']]

Cell In[11], line 4, in clova_gen(text)
      3 def clova_gen(text):
----> 4     return c.start(content + text)['text']

File [~/anaconda3/envs/garbagespam/lib/python3.11/site-packages/clovax/clovax.py:170](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/workspace/electra_garbagespam/~/anaconda3/envs/lucy3/lib/python3.11/site-packages/clovax/clovax.py:170), in ClovaX.start(self, prompt, skillsets)
    167 data = self._build_data("new", prompt, skillsets=skillsets)
    168 self.conversation_id = ""
--> 170 r = self._do_conversation(data)
    172 # Iterate event stream, get event and datas
    173 for line in r.iter_lines(decode_unicode=True):

File [~/anaconda3/envs/garbagespam/lib/python3.11/site-packages/clovax/clovax.py:132](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/workspace/electra_garbagespam/~/anaconda3/envs/lucy3/lib/python3.11/site-packages/clovax/clovax.py:132), in ClovaX._do_conversation(self, data)
    130         raise clovax.errors.TooManyRequestsError()
    131     else:
--> 132         raise Exception(
    133             f"Error occurred while starting conversation. Error code: {r.status_code}"
    134         )
    135 r.encoding = "utf-8"
    136 return r

Exception: Error occurred while starting conversation. Error code: 500

혹시 Errorcode 500이 어떤 유형의 문제에서 비롯되는지에 대해 정보를 공유해주실 수 있는지 여쭤보고 싶습니다. 좋은 레포 만들어주셔서 감사합니다.

deliciouscat avatar Dec 07 '23 01:12 deliciouscat