Skip to content

yaroslav4167/youchat-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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