Skip to main content

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

Uploaded Source

Built Distribution

xontrib_openai-0.0.1-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file xontrib_openai-0.0.1.tar.gz.

File metadata

  • Download URL: xontrib_openai-0.0.1.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

Hashes for xontrib_openai-0.0.1.tar.gz
Algorithm Hash digest
SHA256 11f68d0c2c29b5315e984f85b39aa99fd9f417e5ffe9ae377751a794cfe9baf7
MD5 1641f188e3fdcb94ac7515ec5b03d77f
BLAKE2b-256 13473e6821c21dd619cfa0810f7a655c86f249467e2de490f2cb5158f1b09c21

See more details on using hashes here.

File details

Details for the file xontrib_openai-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for xontrib_openai-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9a233f9f4d2cf100c87f7887a626f4a3edfeb1eea6cc799252346c828ff50692
MD5 bf264ec9ab148cff2eeff53a6988cff5
BLAKE2b-256 9455c8f45e27de7b7011e7471ed980e8bece147fe32a02169c2c8355e00b678e

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