Unofficial CLOVA X API
Project description
Naver Clova X Unofficial API
Unofficial API for Naver Clova X, a Korean AI LLM (Language Model) service.
Install
pip install clovax
How can I get cookie file?
- Install Get cookies.txt LOCALLY
- Export cookie
- Set cookie file path to
get_cookie
function
Usage
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"])
TODO
- Login using given naver ID and password
- Get existed conversation using conversation ID
- Proxy support
- Support personas
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
clovax-0.1.1.tar.gz
(17.4 kB
view details)
File details
Details for the file clovax-0.1.1.tar.gz
.
File metadata
- Download URL: clovax-0.1.1.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23245a0874528fbeacf488b248851277fef1e1f6d26b9b65b344a659de3d45fe |
|
MD5 | 852d4c2c8537f75f6cd0cb8d54309726 |
|
BLAKE2b-256 | c729da33a62f4559f5bc9f72ce7a979dca9ff1ea404e10230690a745edb852fb |