Git Product home page Git Product logo

clova-x's Introduction

I'm mirusu400.

If you want to contact me, or need my help(about Localization/Reversing/Modding/Web or anything!) please mail me through my profile.

My Homepage.

My LinkedIn Profile

πŸ‡°πŸ‡· Activity (Localization)

See Here

✈ Projects

  • Harvest Moon(DS) translate tools - λͺ©μž₯이야기 μ‹œλ¦¬μ¦ˆ λ²ˆμ—­ 도ꡬ
  • Pinterest crawler - Pinterest 크둀러
  • drawfontimage - 폰트λ₯Ό 고정폭 이미지 파일둜 μƒμ„±ν•΄μ£ΌλŠ” 도ꡬ
  • klas-helper - κ΄‘μš΄λŒ€ν•™κ΅ KLAS ν™•μž₯ν”„λ‘œκ·Έλž¨ (Main contributor)

✈ Projects..?

🚩 Activity (CTF / Bug Bounty / Awards)

See Here

πŸ“™ Activity (Others)

  • 곡ꡰ μ£Όμ „μ‚°κΈ°μ •λ³΄λ³΄ν˜Έλ³‘ (2020.09 ~ 2022.06)
  • 2022 SW Maestro 13rd

solved.ac tier

trophy

An image of @mirusu400's Holopin badges, which is a link to view their full Holopin profile

Hits

clova-x's People

Contributors

mirusu400 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

clova-x's Issues

Support removing conversation

We can delete the conversation by simply sending a DELETE web request.

Raw web request sample:

DELETE /api/v1/conversation/[Your conversation ID] HTTP/2
Host: clova-x.naver.com
Cookie: [REDACTED]
Sec-Ch-Ua: 
Sec-Ch-Ua-Mobile: ?0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.5845.111 Safari/537.36
Sec-Ch-Ua-Platform: ""
Accept: */*
Origin: https://clova-x.naver.com
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://clova-x.naver.com/
Accept-Encoding: gzip, deflate, br
Accept-Language: ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7

'ClovaX' object has no attribute 'continue_conversation'

μ•ˆλ…•ν•˜μ„Έμš”?

쒋은 λž˜ν•‘ 라이브러리 λ§Œλ“€μ–΄ μ£Όμ…”μ„œ κ°μ‚¬ν•©λ‹ˆλ‹€.
ClovaX 객체의 continue_conversation() μ‹€ν–‰μ‹œ no attribute μ—λŸ¬κ°€ λ°œμƒν•˜κ³ 
μ½”λ“œλ₯Ό μ‚΄νŽ΄λ³΄λ‹ˆ λ©”μ„œλ“œκ°€ λˆ„λ½λœ κ²ƒμœΌλ‘œ λ³΄μž…λ‹ˆλ‹€.

κ°μ‚¬ν•©λ‹ˆλ‹€.

Add `skillSets` during conversation

Currently CLOVA X support two skills:

  • shopping : 넀이버 μ‡Όν•‘
  • travel : 넀이버 μ—¬ν–‰

It can easily set by adding skillSets parameters.

Raw web request example:

POST /api/v1/generate HTTP/2
Host: clova-x.naver.com
Cookie: [REDACTED]
Sec-Ch-Ua: 
Sec-Ch-Ua-Mobile: ?0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.5845.111 Safari/537.36
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryCnwBRysesplYkoV4
Accept: */*, text/event-stream
Sec-Ch-Ua-Platform: ""
Origin: https://clova-x.naver.com
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://clova-x.naver.com/
Accept-Encoding: gzip, deflate, br
Accept-Language: ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7

------WebKitFormBoundaryCnwBRysesplYkoV4
Content-Disposition: form-data; name="form"; filename="blob"
Content-Type: application/json

{"text":"asdf","action":"new","skillSets":["shopping","travel"]}
------WebKitFormBoundaryCnwBRysesplYkoV4--

Errorcode: 500

μ•ˆλ…•ν•˜μ„Έμš”.

μ œκ°€ 가지고 μžˆλŠ” 데이터셋에 λŒ€ν•΄ ν΄λ‘œλ°”μ˜ 벀치마크 μ„±λŠ₯을 μΈ‘μ •ν•˜κ³ μž ν•˜λŠ”λ°, 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이 μ–΄λ–€ μœ ν˜•μ˜ λ¬Έμ œμ—μ„œ λΉ„λ‘―λ˜λŠ”μ§€μ— λŒ€ν•΄ 정보λ₯Ό κ³΅μœ ν•΄μ£Όμ‹€ 수 μžˆλŠ”μ§€ 여쭀보고 μ‹ΆμŠ΅λ‹ˆλ‹€.
쒋은 레포 λ§Œλ“€μ–΄μ£Όμ…”μ„œ κ°μ‚¬ν•©λ‹ˆλ‹€.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.