Skip to content

Commit

Permalink
Include version in HUMANSCRIPT_API
Browse files Browse the repository at this point in the history
  • Loading branch information
lukechilds committed Aug 5, 2023
1 parent 6030fcf commit 1f02b19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions humanscript
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ source "${CONFIG_FILE}"
# Defaults
HUMANSCRIPT_API_KEY="${HUMANSCRIPT_API_KEY:-"sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"}"
HUMANSCRIPT_MODEL="${HUMANSCRIPT_MODEL:-"gpt-4"}"
HUMANSCRIPT_API="${HUMANSCRIPT_API:-"https://api.openai.com"}"
HUMANSCRIPT_API="${HUMANSCRIPT_API:-"https://api.openai.com/v1"}"
HUMANSCRIPT_EXECUTE="${HUMANSCRIPT_EXECUTE:-"true"}"
HUMANSCRIPT_REGENERATE="${HUMANSCRIPT_REGENERATE:-"false"}"

Expand Down Expand Up @@ -67,7 +67,7 @@ data=$(echo '{
}' | jq)

# Send request and stream chunked responses back
curl --silent --show-error "${HUMANSCRIPT_API}/v1/chat/completions" \
curl --silent --show-error "${HUMANSCRIPT_API}/chat/completions" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${HUMANSCRIPT_API_KEY}" \
--data "${data}" | \
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,14 @@ $ HUMANSCRIPT_REGENERATE="true" ./asciiman

### `HUMANSCRIPT_API`

Default: `https://api.openai.com`
Default: `https://api.openai.com/v1`

A server following OpenAI's Chat Completion API.
Many local proxies exist that implement this API in front of locally running LLMs like Llama 2. [LM Studio](https://lmstudio.ai/) is a good option.
```shell
HUMANSCRIPT_API="http://localhost:1234"
HUMANSCRIPT_API="http://localhost:1234/v1"
```
### `HUMANSCRIPT_API_KEY`
Expand Down

0 comments on commit 1f02b19

Please sign in to comment.