Unofficial API for Naver Clova X, a Korean AI LLM (Language Model) service.
pip install clovax
- Install Get cookies.txt LOCALLY
- Export cookie
- Set cookie file path to
get_cookie
function
Start a conversation
from clovax import ClovaX
c = ClovaX()
c.get_cookie("[Your netscape cookie file]")
log = c.start("Hello world!")
print(log["text"])
Continue a conversation
from clovax import ClovaX
c = ClovaX()
c.get_cookie("[Your netscape cookie file]")
log = c.start("Hello world!")
print(log["text"])
# At this time, you can continue the conversation using existed session (conversation ID)
log = c.conversation("Who are you?")
print(log["text"])
Regenerate a conversation
from clovax import ClovaX
c = ClovaX()
c.get_cookie("[Your netscape cookie file]")
log = c.start("Hello world!")
log = c.regenerate()
print(log["text"])
Conversation with a skillset
from clovax import ClovaX
import json
c = ClovaX()
c.get_cookie("clova-x.naver.com_cookies.txt")
log = c.start("가을에 입을만한 바지 추천해 줘", skillsets=["shopping", "travel"])
with open("./test.html", "w", encoding="utf-8") as f:
f.write(log["contents"][1]["content"])
print(log["text"])
- Login using given naver ID and password
- Get existed conversation using conversation ID
- Proxy support
- Support personas