Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
a committed Jul 7, 2023
2 parents cf05eaf + 156f686 commit a0e4fa5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ SIGNAL_PHONE_NUMBER=
# ChatGPT
OPENAI_API_BASE=
OPENAI_API_KEY=
OPENAI_MODEL=gpt-3.5-turbo

# Bard
BARD_TOKEN=
Expand All @@ -20,4 +21,4 @@ MODEL=/models/<your_model_here>
DEFAULT_MODEL=

# Space-separated list of disabled models
DISABLED_MODELS=bard bing hugchat # these require cookie authentication (see readme)
DISABLED_MODELS=bard hugchat # these require cookie authentication (see readme)
2 changes: 2 additions & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ Go to https://bard.google.com/

### 3. Bing Chat

_The setup steps below may not be required but is still supported in case unauthenticated access to Bing Chat does not work in your region._

See the [EdgeGPT](https://github.com/acheong08/EdgeGPT) repository. TL;DR:

<details>
Expand Down
5 changes: 4 additions & 1 deletion ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ def get_api(self):
openai_api_base = (
os.getenv("OPENAI_API_BASE") or "https://api.openai.com/v1"
)
return OpenAIAPI(api_key=openai_api_key, api_base=openai_api_base)
openai_model = os.getenv("OPENAI_MODEL") or "gpt-3.5-turbo"
return OpenAIAPI(
api_key=openai_api_key, api_base=openai_api_base, model=openai_model
)

if self.model == "hugchat":
cookie_path = "./config/hugchat.json"
Expand Down
1 change: 0 additions & 1 deletion config/bing.json

This file was deleted.

0 comments on commit a0e4fa5

Please sign in to comment.