Skip to content

Commit

Permalink
simplify api key setup (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
devashishtyagi authored Feb 6, 2024
1 parent 54a9eb1 commit 4913cd8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"model_name = \"accounts/fireworks/models/fw-function-call-34b-v0\"\n",
"clinet = client = openai.OpenAI(\n",
" base_url = \"https://api.fireworks.ai/inference/v1\",\n",
" api_key = os.environ[\"FW_API_KEY\"],\n",
" api_key = \"YOUR_FW_API_KEY\",\n",
")"
],
"metadata": {
Expand Down Expand Up @@ -616,4 +616,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}
4 changes: 2 additions & 2 deletions examples/function_calling/fireworks_functions_qa.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"source": [
"client = openai.OpenAI(\n",
" base_url = \"https://api.fireworks.ai/inference/v1\",\n",
" api_key = os.environ[\"FW_API_KEY\"],\n",
" api_key = \"YOUR_FW_API_KEY\",\n",
")\n",
"model_name = \"accounts/fireworks/models/fw-function-call-34b-v0\""
],
Expand Down Expand Up @@ -476,4 +476,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,15 @@
"\n",
"llm = ChatOpenAI(\n",
" base_url=\"https://api.fireworks.ai/inference/v1\",\n",
" api_key=os.environ[\"FW_API_KEY\"],\n",
" api_key=\"YOUR_FW_API_KEY\",\n",
" model=\"accounts/fireworks/models/fw-function-call-34b-v0\",\n",
" temperature=0.0,\n",
" max_tokens=256,\n",
")\n",
"\n",
"math_llm = ChatOpenAI(\n",
" base_url=\"https://api.fireworks.ai/inference/v1\",\n",
" api_key=os.environ[\"FW_API_KEY\"],\n",
" api_key=\"YOUR_FW_API_KEY\",\n",
" model=\"accounts/fireworks/models/mixtral-8x7b-instruct\",\n",
" temperature=0.0,\n",
")"
Expand Down Expand Up @@ -346,4 +346,4 @@
"outputs": []
}
]
}
}
6 changes: 3 additions & 3 deletions examples/function_calling/fw_autogen_image_gen.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@
"config_list = [\n",
" {\n",
" \"model\": \"accounts/fireworks/models/fw-function-call-34b-v0\",\n",
" \"api_key\": os.environ[\"FW_API_KEY\"],\n",
" \"api_key\": \"YOUR_FW_API_KEY\",\n",
" \"base_url\": \"https://api.fireworks.ai/inference/v1\",\n",
" \"temperature\": 0.0\n",
" }\n",
"]\n",
"OPENAI_API_KEY = os.environ[\"OPENAI_API_KEY\"]"
"OPENAI_API_KEY = \"YOUR_OPENAI_API_KEY\""
]
},
{
Expand Down Expand Up @@ -206,4 +206,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}

0 comments on commit 4913cd8

Please sign in to comment.