Spaces:
Runtime error
Runtime error
Update chain_app.py
Browse files- chain_app.py +2 -2
chain_app.py
CHANGED
|
@@ -24,7 +24,7 @@ groq_client = Groq(api_key=groq_api_key)
|
|
| 24 |
co = cohere.Client(
|
| 25 |
api_key=cohere_api_key,
|
| 26 |
)
|
| 27 |
-
|
| 28 |
|
| 29 |
# API_URL = "https://api-inference.huggingface.co/models/PartAI/TookaBERT-Large"
|
| 30 |
# headers = {"Authorization": f"Bearer {hf_token}"}
|
|
@@ -2330,7 +2330,7 @@ async def main(message: cl.Message):
|
|
| 2330 |
# ).send()
|
| 2331 |
client = OpenAI(
|
| 2332 |
base_url = "https://integrate.api.nvidia.com/v1",
|
| 2333 |
-
api_key =
|
| 2334 |
)
|
| 2335 |
|
| 2336 |
completion = client.chat.completions.create(
|
|
|
|
| 24 |
co = cohere.Client(
|
| 25 |
api_key=cohere_api_key,
|
| 26 |
)
|
| 27 |
+
nvidia_api_key = os.environ.get('NVIDIA_API_KEY')
|
| 28 |
|
| 29 |
# API_URL = "https://api-inference.huggingface.co/models/PartAI/TookaBERT-Large"
|
| 30 |
# headers = {"Authorization": f"Bearer {hf_token}"}
|
|
|
|
| 2330 |
# ).send()
|
| 2331 |
client = OpenAI(
|
| 2332 |
base_url = "https://integrate.api.nvidia.com/v1",
|
| 2333 |
+
api_key = nvidia_api_key
|
| 2334 |
)
|
| 2335 |
|
| 2336 |
completion = client.chat.completions.create(
|