semvec/pypi-packages huggingface dataset:
clovax 0.1.1
Unofficial CLOVA X API
Requires Python: >=3.7
Keywords: ClovaX,Naver,CLOVA,CLOVA X,CLOVA X API

# Naver Clova X Unofficial API


![clova-logo](https://raw.githubusercontent.com/mirusu400/CLOVA-X/main/doc/clova-logo.png)

<a href="https://pypi.org/project/clovax/"><img alt="PyPI package" src="https://img.shields.io/badge/pypi-clovax-green"></a>
<a href="https://github.com/mirusu400/CLOVA-X/stargazers"><img src="https://img.shields.io/github/stars/mirusu400/CLOVA-X?style=social"></a>
<a href="https://pypi.org/project/clovax/"><img alt="PyPI" src="https://img.shields.io/pypi/v/clovax"></a>

Unofficial API for Naver Clova X, a Korean AI LLM (Language Model) service.

## Install

```
pip install clovax
```

## How can I get cookie file?

1. Install [Get cookies.txt LOCALLY](https://chrome.google.com/webstore/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc)
2. Export cookie
3. Set cookie file path to `get_cookie` function

## Usage
**Start a conversation**
```python
from clovax import ClovaX

c = ClovaX()
c.get_cookie("[Your netscape cookie file]")
log = c.start("Hello world!")
print(log["text"])
```

**Continue a conversation**
```python
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**
```python
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**
```python
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
robin-powered-bot 0.0.8
Provides a set of utilities to simplify communication with robin-powered API and more easily automate bookings.

# Robin Powered API Bot - RoBot

Many companies are nowadays using the [Robin](https://robinpowered.com/) platform to connect employees with desks, rooms and each other.

Robin Powered API Bot (RoBot) is a package that tries to simplify the life of employees that are not allowed to have permanent desks anymore. All that is necessary are email and seatid.

## Getting Started

Assuming that you have a supported version of Python installed, you can first set up your environment with:

```py
$ python -m venv .venv
...
$ . .venv/bin/activate
```

Then you can install robin-powered-bot
```py
python -m pip install robin-powered-bot
```

## Using RoBot

In order to use the package an API key has to be provided via the env variable *ROBIN_AUTH_TOKEN*.

### User Info

UserInfo is used to load and store all info about the user, it needs the following parameters:
- email: employee email;
- stime: start time of the working day as it would be specified in Robin;
- duration: how long is your working day, usually 8 hours;
- sid: seat id, identifier of the seat that you want to book.

```py
from src.user import UserInfo
users_info = [UserInfo("dbarone@company.com", 11, 8, 10)]
```

**Notes**: Seat Id has still to be provided, haven't found yet a more user friendly way to do it.

### Reserve

Following an example to book a desk for 5 days, from the 15th to the 20th.

```py
from datetime import datetime
from src.robin import Robin
from src.user import UserInfo

users_info = [UserInfo("dbarone@company.com", 11, 8, 10)]
r = Robin(users_info)
results = r.reserve(datetime(2022, 11, 15), datetime(2022, 11, 20))
print(results)

```

**Notes**:

The reserve method will do the following:
- Reserve all working days;
- Skip all weekends, it doesn't deal with holidays;
- Companies might enforce a limit on how much in advance a desk can be booked, the reserve method will just stop.

## Check in

Following an example of check in.

```py
from datetime import datetime
from src.robin import Robin
from src.user import UserInfo

users_info = [UserInfo("dbarone@company.com", 11, 8, 10)]
r = Robin(users_info)
results = r.check_in(datetime(2022, 11, 24))
print(results)
```