Skip to content

Commit

Permalink
🔒 remove url to env
Browse files Browse the repository at this point in the history
  • Loading branch information
bruceunx committed May 3, 2024
1 parent 63ad40b commit 01d4465
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gpt_server/routers/cohere.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

api_key = os.environ['COHERE_KEY']

url = "https://api.cohere.ai/v1/chat"
url = os.environ['COHERE_URL']

headers = {
"Authorization": f"Bearer {api_key}",
Expand Down
4 changes: 2 additions & 2 deletions gpt_server/routers/gemini.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

api_key = os.environ['GEMINI_KEY']

API_URL = f"https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:streamGenerateContent?alt=sse&key={api_key}"
API_URL_PRO = f"https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-pro-latest:streamGenerateContent?alt=sse&key={api_key}"
API_URL = f"{os.environ['GEMINI_URL']}?alt=sse&key={api_key}"
API_URL_PRO = f"{os.environ['GEMINI_PRO_URL']}?alt=sse&key={api_key}"

PROXY = os.environ['proxy'] if 'proxy' in os.environ else None

Expand Down
2 changes: 1 addition & 1 deletion gpt_server/routers/groq.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

router = APIRouter()

url = "https://api.groq.com/openai/v1/chat/completions"
url = os.environ['GROQ_URL']

headers = {
"Authorization": f"Bearer {os.environ['GROQ_KEY']}",
Expand Down
2 changes: 1 addition & 1 deletion gpt_server/routers/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

router = APIRouter()

url = "https://api.pumpkinaigc.online/v1/chat/completions"
url = os.environ['OPENAI_URL']

headers = {
"Authorization": f"Bearer {os.environ['OPENAI_KEY']}",
Expand Down

0 comments on commit 01d4465

Please sign in to comment.