Thuta Learning
ရှာဖွေရန်
BasicAIadvanced

Models (LLMs & Chat)

စိတ်လျှော့ပါ။ ဒီခန်းကို စာအုပ်လိုမဟုတ်ဘဲ စကားပြောသလိုပဲ၊ နားလည်လွယ်အောင် ရှင်းပါမယ်။

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.
Models (LLMs & Chat) | Thuta Learning