|
159 | 159 | "import time\n",
|
160 | 160 | "import asyncio\n",
|
161 | 161 | "from typing import List, Dict\n",
|
| 162 | + "from dotenv import load_dotenv\n", |
162 | 163 | "\n",
|
163 | 164 | "from autogen_agentchat.agents import AssistantAgent\n",
|
164 | 165 | "from autogen_core import CancellationToken\n",
|
165 | 166 | "from autogen_agentchat.messages import TextMessage\n",
|
166 | 167 | "from azure.core.credentials import AzureKeyCredential\n",
|
167 | 168 | "from autogen_ext.models.azure import AzureAIChatCompletionClient\n",
|
168 | 169 | "\n",
|
169 |
| - "import chromadb" |
| 170 | + "import chromadb\n", |
| 171 | + "\n", |
| 172 | + "load_dotenv()" |
170 | 173 | ]
|
171 | 174 | },
|
172 | 175 | {
|
|
187 | 190 | "client = AzureAIChatCompletionClient(\n",
|
188 | 191 | " model=\"gpt-4o-mini\",\n",
|
189 | 192 | " endpoint=\"https://models.inference.ai.azure.com\",\n",
|
190 |
| - " credential=AzureKeyCredential(os.environ[\"GITHUB_TOKEN\"]),\n", |
| 193 | + " credential=AzureKeyCredential(os.getenv(\"GITHUB_TOKEN\")),\n", |
191 | 194 | " model_info={\n",
|
192 | 195 | " \"json_output\": True,\n",
|
193 | 196 | " \"function_calling\": True,\n",
|
|
242 | 245 | "execution_count": 5,
|
243 | 246 | "metadata": {},
|
244 | 247 | "outputs": [],
|
| 248 | + "source": [], |
245 | 249 | "source": [
|
246 | 250 | "def get_retrieval_context(query: str) -> str:\n",
|
247 | 251 | " results = collection.query(\n",
|
|
0 commit comments