Wk1 Day2 Exercise Ollama solution

This commit is contained in:
266367
2025-01-27 19:57:40 -05:00
parent f7a4ef0302
commit fe1a0d79ac

View File

@@ -15,9 +15,15 @@
"from openai import OpenAI\n", "from openai import OpenAI\n",
"\n", "\n",
"load_dotenv(override=True)\n", "load_dotenv(override=True)\n",
"api_key = os.getenv('DEEPSEEK_API_KEY')\n", "# Deep seek API payload\n",
"base_url=os.getenv('DEEPSEEK_BASE_URL')\n", "# api_key = os.getenv('DEEPSEEK_API_KEY')\n",
"MODEL = \"deepseek-chat\"\n", "# base_url=os.getenv('DEEPSEEK_BASE_URL')\n",
"# MODEL = \"deepseek-chat\"\n",
"\n",
"# Day 2 Exercise with Ollama API\n",
"api_key = os.getenv('OLLAMA_API_KEY')\n",
"base_url = os.getenv('OLLAMA_BASE_URL')\n",
"MODEL = \"llama3.2\"\n",
"\n", "\n",
"system_prompt = \"You are an assistant that analyzes the contents of a website \\\n", "system_prompt = \"You are an assistant that analyzes the contents of a website \\\n",
"and provides a short summary, ignoring text that might be navigation related. \\\n", "and provides a short summary, ignoring text that might be navigation related. \\\n",