Skip to main content

Simple communication with YouChat in python.

Project description

youchat-py

yaroslav4167 - youchat-py stars - youchat-py forks - youchat-py

GitHub release License issues - youchat-py

Simple communication with YouChat (GPT-4) in python and CLI.

Installation

pip install youchat-py

If you use CLI - don't forget to install xvfb.

apt install xvfb

Usage

usage: youchat [-h] [-out_type OUT_TYPE] [-timeout TIMEOUT] MESSAGE

positional arguments:
  MESSAGE               Message to YouChat

options:
  -h, --help            show this help message and exit
  -out_type OUT_TYPE, -ot OUT_TYPE
                        Output type (json/string)
  -timeout TIMEOUT, -t TIMEOUT
                        Timeout to wait response

Example 1

Use in CLI mode

youchat hello!

Returns: {"generated_text": "Hello! How can I assist you today?"}

youchat -out_type string "who are you"

Returns: I am YouBot, a large language model developed by You.com. ...

Note on zsh - you must use single quotes youchat 'who are you?'

Example 2

Use in module mode test_unit.py:

from youchat import you_message

print( you_message(text='Hello, World!', out_type="string") )

Returns: "Hello, World!" is a common phrase used in ...

Problems and solutions

If you often cannot get youchat response - try to update seleniumbase library pip install -U seleniumbase

Used library

  • seleniumbase

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

youchat_py-1.2.1.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

youchat_py-1.2.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file youchat_py-1.2.1.tar.gz.

File metadata

  • Download URL: youchat_py-1.2.1.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for youchat_py-1.2.1.tar.gz
Algorithm Hash digest
SHA256 4b711e0d2382c846e9f2df523923b5d5ff4bbc458757e092d8516c76bcf6ce60
MD5 c7a4216d92761affe2e9f321978d9882
BLAKE2b-256 628fde002acafbf9688ef54c23b93d8a1663afa948b081a104cf14e8ab342279

See more details on using hashes here.

File details

Details for the file youchat_py-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: youchat_py-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for youchat_py-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 df485c15f6203c421fbc79229161b2be8740a8eed2af02c927229136c2005d6f
MD5 5afead2c7a97326b25f71ec39dac7c4b
BLAKE2b-256 4fd320dd6d994fc6f2e74505feaefb4471f2c19ee9b2a48eea34f7712d49aa0b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page