1️⃣OpenAI LLM
LangChain: OpenAI LLM
!echo "OPENAI_API_KEY=YOUR_OPENAI_API_KEY" >> .env
import os
from dotenv import load_dotenv
load_dotenv()
api_key = os.getenv("OPENAI_API_KEY")#%pip install langchain
#%pip install openai
#%pip install python-dotenvRequirement already satisfied: python-dotenv in /home/kubwa/anaconda3/envs/langchain/lib/python3.9/site-packages (1.0.0)
Note: you may need to restart the kernel to use updated packages.!echo "OPENAI_API_KEY=<Your_OpenAI_Key" >> .envimport os
from dotenv import load_dotenv
load_dotenv()
api_key = os.getenv("OPENAI_API_KEY")1. LangChain OpenAI
2. Paramter 조절
Temperarure
Streaming
3. Prompt 실습
Last updated