Skip to content

Commit

Permalink
ntbk updates
Browse files Browse the repository at this point in the history
  • Loading branch information
dglogo committed Dec 19, 2024
1 parent f9f4438 commit a323860
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions cookbook/structured_report_generation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@
"\n",
"Save these API Keys as environment variables.\n",
"\n",
"First, set the NVIDIA API Key as the environment variable and then define the LLM. \n",
"In this tutorial we use the newest llama model, but you can browse through all available models on the NVIDIA API Catalog."
"First, set the NVIDIA API Key as the environment variable."
]
},
{
Expand All @@ -122,13 +121,7 @@
"if not os.environ.get(\"NVIDIA_API_KEY\", \"\").startswith(\"nvapi-\"):\n",
" nvapi_key = getpass.getpass(\"Enter your NVIDIA API key: \")\n",
" assert nvapi_key.startswith(\"nvapi-\"), f\"{nvapi_key[:5]}... is not a valid key\"\n",
" os.environ[\"NVIDIA_API_KEY\"] = nvapi_key\n",
"\n",
"from langchain_nvidia_ai_endpoints import ChatNVIDIA\n",
"tool_models = [model for model in ChatNVIDIA.get_available_models() if model.supports_tools]\n",
"print(\"NVDA tool models:\")\n",
"print(tool_models)\n",
"llm = ChatNVIDIA(model=\"meta/llama-3.3-70b-instruct\", temperature=0)"
" os.environ[\"NVIDIA_API_KEY\"] = nvapi_key"
]
},
{
Expand Down Expand Up @@ -192,7 +185,9 @@
"source": [
"### Working with the NVIDIA API Catalog\n",
"\n",
"Let's test the API endpoint of the model chosen earlier."
"Let's test the API endpoint.\n",
"\n",
"In this notebook, you will use the newest llama model, llama-3.3-70b-instruct, as the LLM. Define the LLM below and test the API Catalog.\n"
]
},
{
Expand Down

0 comments on commit a323860

Please sign in to comment.