zeke / yolox

🤞 Use AI language models to write one-liner shell commands, then execute them.
16 stars 3 forks source link

use openai npm package #4

Closed zeke closed 5 months ago

zeke commented 5 months ago

The existing implementation of yolox is a shell script that shells out to the chatgpt npm package. That package was a hack (albeit a beautiful one; thank you @transitive-bullshit) to programmaticaly run GPT before OpenAI had a public API.

Well.. now OpenAI of course does have a public API, so this PR switches over to using that via their official openai npm package.

My secret motivation for this change is to unblock using the Replicate Lifeboat, an OpenAI-compatible proxy to the Replicate API that lets you run models like Llama 3 instead. cc @mattt 👋🏼

zeke commented 5 months ago

Calling this a new major because hey it's a full rewrite maybe I broke something.

$ npx np@latest major
Publish a new version of yolox (current: 1.0.4, next: 2.0.0)

Commits:
- Merge pull request #4 from zeke/use-openai-npm-package  11aa7f2
- use openai npm package  2aebc66
- add imagemagic convert example  0b0e467

  ✔ Prerequisite check
  ✔ Git
  ✔ Installing dependencies using npm
  ✔ Running tests
  ✔ Bumping version
  ✔ Publishing package
  ✔ Pushing tags
  ✔ Creating release draft on GitHub

 yolox 2.0.0 published 🎉