This is my first REAL package.
Project description
Welcome to my OpenAI Playground!
Making Open AI
even easier.
STILL ACTIVELY DEVELOPING
How to play
-
pip install easy-open-ai
-
in your working folder, create
.env
file withOPENAI_API_KEY=
, or make such environment variable -
enjoy!
from easy_open_ai import
...Version 0.1.6
-
get_picture(text, save=True)
(as b64_json string) -
get_n_pictures(text, n=3)
-
get_answer(question)
-
correct_grammar(text)
Version 0.1.7
-
get_picture_url(text)
(url lives 1 hour) -
get_n_pictures_urls(text, n=3)
-
is_harmful_text(text)
(sometimes ignores censorship escaping: '@' instead of 'a', etc) -
how_many_text_tokens(text)
(most of this package works with text no longer than 1024 text-tokens, it's recommended for validating the text length) -
sum_up_as_haiku(text)
-
get_poem(text)
-
get_answer_as_poem(question)
-
autocomplete_text(text)
-
translate_text(text, language='Ukrainian')
-
get_answer_with_instruction(question,instruction, chaos_coefficient=0.5, model="gpt-3.5-turbo", max_tokens=1024)
Version 0.1.8
ADDED LIVE TEXT DISPLAYING
get_answer_with_instruction_stream(question)
(it's a generator)
to get chatGPT-like live text generation, add
_stream
to the name, for example,aget_answer_as_poem_stream(question)
!not all of the available text functions have this yet
-
More easy functions coming soon!
For async
version of a function, add a
in front, for example, aget_picture(text)
instead of get_picture(text)
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for easy_open_ai-0.1.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d2abfff68c17bc03d5cbac020877cb221ed90a075b4efb495ad56988e7879e8 |
|
MD5 | 58cc039eb928b08fdf56330d59b1ceff |
|
BLAKE2b-256 | b7e3d7f6f982e52b4753b1c39f1138923bc5af8fd93bb9bbd71996319f27eb41 |