Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set path, hostname, auth #272

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open

Conversation

tgolsen
Copy link

@tgolsen tgolsen commented Feb 27, 2024

This PR lets you set your hostname and path, as well as change your auth type. This was driven by necessity to connect to the Azure instance of ChatGPT I wanted to connect to. I'm using this version to write my commit messages now.

First, new configs:

./dist/cli.mjs config set OPENAI_KEY=****
./dist/cli.mjs config set authHeaderName=api-key
./dist/cli.mjs config set hostname=gpt4-resources.openai.azure.com
./dist/cli.mjs config set apipath='/openai/deployments/*****/chat/completions?api-version=2023-05-15'

OPENAI_KEY works with AuthHeaderName to create something like the below.

  headers: {
    'api-key': '***',
    ...
  },
# Or, by default
  headers: {
    'Authorization': 'Bearer sk-***',
    ...
  },

The fields hostname and apipath are probably self-explanatory.

I'm failing some tests, but so is develop 🤔 So I'm not sure if this is a step back or something up with my local set up.
image
image

Looking forward to feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant