Use Open AI models in xonsh shell.
Project description
Use Open AI models in xonsh shell.
If you like the idea click ⭐ on the repo and tweet.
Installation
To install use pip:
xpip install -U xontrib-openai
# or: xpip install -U git+https://github.com/anki-code/xontrib-openai
Usage
$OPENAI_API_KEY = 'abcd1234' # https://platform.openai.com/account/api-keys
# $OPENAI_MODEL = 'text-davinci-003' # https://platform.openai.com/docs/models/overview
# $OPENAI_MAX_TOKENS = 100 # default
xontrib load openai
ai! write git commit on bash. Give me only command
# git commit -m "Commit message"
ai! send post request with json data on python
# import requests
# import json
#
# url = 'http://example.com/api/1/users'
# data = {
# "first_name": "John",
# "last_name": "Smith"
# }
#
# headers = {'Content-type': 'application/json'}
# response = requests.post(url, data=json.dumps(data), headers=headers)
Credits
This package was created with xontrib template.
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
xontrib_openai-0.0.2.tar.gz
(2.7 kB
view details)
Built Distribution
File details
Details for the file xontrib_openai-0.0.2.tar.gz
.
File metadata
- Download URL: xontrib_openai-0.0.2.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 449f284a5f3a23f9ae1d2ba17d02a572f88603b00be6004a73afa40f6cd94d67 |
|
MD5 | 2810a38d385f9f5926fc1c2bfddb9bfd |
|
BLAKE2b-256 | 555a4ab6e3ed1ec98003fa26c548fccce108eeb71a30d3dca7c55878da7f3461 |
File details
Details for the file xontrib_openai-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: xontrib_openai-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e833756a72fb1bf7ba751a48901084f7a7a9e94a386dfe38362ff3565eceed3 |
|
MD5 | e451ddef7b5e28f8b20d4ed3891db843 |
|
BLAKE2b-256 | 7476c7c9f15d4f74e0566271cc66c9a9b416a3064aee6fbb9ef96764d1832a9c |