LangChain တွင် language models နှစ်မျိုးရှိသည်:
• LLMs: Text string ကို input အဖြစ်လက်ခံပြီး text string ကို return ပြန်ပေးသော model (e.g., "Tell me a joke." -> "Why don't scientists trust atoms? ...")
• Chat Models: List of chat messages များကို input အဖြစ်လက်ခံပြီး chat message တစ်ခုကို return ပြန်ပေးသည်။ (e.g., System, Human, AI messages)
python
from langchain_openai import ChatOpenAI
# Initialize the chat model
chat = ChatOpenAI(model="gpt-3.5-turbo", temperature=0)
# Invoke the model with a message
response = chat.invoke("what is the capital of Myanmar?")
print(response.content)You should see
The capital of Myanmar is Naypyidaw.