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.3.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

youchat_py-1.2.3-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for youchat_py-1.2.3.tar.gz
Algorithm Hash digest
SHA256 5f9443fc58d8fe8c335192c7844d2fd18cf8d624a59440cd332f7a03821016ea
MD5 458f14bd4a226a3ea63e61c8ba64ff15
BLAKE2b-256 3928efffbf743f727a6432df5b762218b87ec5830708378ed707c79e8428eb3d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: youchat_py-1.2.3-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for youchat_py-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 854cfec1140ed4d7e4072739cc1dd47923690f0d4e38c00039ea86dcdf2c89d6
MD5 c2f24b5601fc890f853fbb878afc9314
BLAKE2b-256 067b39a40ac6e192451abbb85123d543ac44e26178d0b6c96e03d699b2e03406

See more details on using hashes here.

Supported by

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