Skip to content

Commit 43d5c5a

Browse files
feat(api): remove GRADIENTAI env vars
1 parent 15c64de commit 43d5c5a

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
lint:
1717
timeout-minutes: 10
1818
name: lint
19-
runs-on: ${{ github.repository == 'stainless-sdks/gradientai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
19+
runs-on: ${{ github.repository == 'stainless-sdks/gradient-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
2020
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
2121
steps:
2222
- uses: actions/checkout@v4
@@ -36,7 +36,7 @@ jobs:
3636
run: ./scripts/lint
3737

3838
build:
39-
if: github.repository == 'stainless-sdks/gradientai-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
39+
if: github.repository == 'stainless-sdks/gradient-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
4040
timeout-minutes: 10
4141
name: build
4242
permissions:
@@ -76,7 +76,7 @@ jobs:
7676
test:
7777
timeout-minutes: 10
7878
name: test
79-
runs-on: ${{ github.repository == 'stainless-sdks/gradientai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
79+
runs-on: ${{ github.repository == 'stainless-sdks/gradient-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
8080
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
8181
steps:
8282
- uses: actions/checkout@v4

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 170
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fgradientai-015417b36365dfcb32166e67379c38de8bf5127c33dff646097a819a7b4dc588.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fgradient-015417b36365dfcb32166e67379c38de8bf5127c33dff646097a819a7b4dc588.yml
33
openapi_spec_hash: d7d811c13cc79f15d82fe680cf425859
4-
config_hash: b7f3d0224b636e5f618a254fa3a6499a
4+
config_hash: 77ddef130940a6ad8ea6c6f66aee8757

scripts/utils/upload-artifact.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ UPLOAD_RESPONSE=$(curl -v -X PUT \
2020

2121
if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then
2222
echo -e "\033[32mUploaded build to Stainless storage.\033[0m"
23-
echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/gradientai-python/$SHA/$FILENAME'\033[0m"
23+
echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/gradient-python/$SHA/$FILENAME'\033[0m"
2424
else
2525
echo -e "\033[31mFailed to upload artifact.\033[0m"
2626
exit 1

src/gradient/_client.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,20 +96,20 @@ def __init__(
9696
"""Construct a new synchronous Gradient client instance.
9797
9898
This automatically infers the following arguments from their corresponding environment variables if they are not provided:
99-
- `api_key` from `GRADIENTAI_API_KEY`
100-
- `inference_key` from `GRADIENTAI_INFERENCE_KEY`
101-
- `agent_key` from `GRADIENTAI_AGENT_KEY`
99+
- `api_key` from `GRADIENT_API_KEY`
100+
- `inference_key` from `GRADIENT_INFERENCE_KEY`
101+
- `agent_key` from `GRADIENT_AGENT_KEY`
102102
"""
103103
if api_key is None:
104-
api_key = os.environ.get("GRADIENTAI_API_KEY")
104+
api_key = os.environ.get("GRADIENT_API_KEY")
105105
self.api_key = api_key
106106

107107
if inference_key is None:
108-
inference_key = os.environ.get("GRADIENTAI_INFERENCE_KEY")
108+
inference_key = os.environ.get("GRADIENT_INFERENCE_KEY")
109109
self.inference_key = inference_key
110110

111111
if agent_key is None:
112-
agent_key = os.environ.get("GRADIENTAI_AGENT_KEY")
112+
agent_key = os.environ.get("GRADIENT_AGENT_KEY")
113113
self.agent_key = agent_key
114114

115115
self._agent_endpoint = agent_endpoint
@@ -364,20 +364,20 @@ def __init__(
364364
"""Construct a new async AsyncGradient client instance.
365365
366366
This automatically infers the following arguments from their corresponding environment variables if they are not provided:
367-
- `api_key` from `GRADIENTAI_API_KEY`
368-
- `inference_key` from `GRADIENTAI_INFERENCE_KEY`
369-
- `agent_key` from `GRADIENTAI_AGENT_KEY`
367+
- `api_key` from `GRADIENT_API_KEY`
368+
- `inference_key` from `GRADIENT_INFERENCE_KEY`
369+
- `agent_key` from `GRADIENT_AGENT_KEY`
370370
"""
371371
if api_key is None:
372-
api_key = os.environ.get("GRADIENTAI_API_KEY")
372+
api_key = os.environ.get("GRADIENT_API_KEY")
373373
self.api_key = api_key
374374

375375
if inference_key is None:
376-
inference_key = os.environ.get("GRADIENTAI_INFERENCE_KEY")
376+
inference_key = os.environ.get("GRADIENT_INFERENCE_KEY")
377377
self.inference_key = inference_key
378378

379379
if agent_key is None:
380-
agent_key = os.environ.get("GRADIENTAI_AGENT_KEY")
380+
agent_key = os.environ.get("GRADIENT_AGENT_KEY")
381381
self.agent_key = agent_key
382382

383383
self._agent_endpoint = agent_endpoint

0 commit comments

Comments
 (0)