|
| 1 | +{ |
| 2 | + "id": "langchain", |
| 3 | + "title": "LangChain", |
| 4 | + "slug": "langchain", |
| 5 | + "description": "LangChain হল এআই মডেলগুলি ব্যবহার করে অ্যাপ্লিকেশন তৈরি করার জন্য একটি শক্তিশালী ফ্রেমওয়ার্ক যা Python এবং Node.js-এ ব্যাবহার করা হয়। এটি LLM (Large Language Model) এপ্লিকেশনগুলির জন্য বিভিন্ন টুল এবং কম্পোনেন্ট সরবরাহ করে।", |
| 6 | + "colorPref": "#5A67D8", |
| 7 | + "contents": [ |
| 8 | + { |
| 9 | + "title": "প্রাথমিক কমান্ড এবং ইন্সটলেশন (Python)", |
| 10 | + "items": [ |
| 11 | + { |
| 12 | + "definition": "LangChain ইন্সটল করা", |
| 13 | + "code": "pip install langchain" |
| 14 | + }, |
| 15 | + { |
| 16 | + "definition": "OpenAI API ইন্টিগ্রেশন", |
| 17 | + "code": "pip install openai" |
| 18 | + }, |
| 19 | + { |
| 20 | + "definition": "প্রাথমিক সেটআপ", |
| 21 | + "code": "from langchain.llms import OpenAI\nllm = OpenAI(temperature=0.9)\ntext = 'Translate this into French.'\nprint(llm(text))" |
| 22 | + }, |
| 23 | + { |
| 24 | + "definition": "চেইন তৈরি করা (Chain Creation)", |
| 25 | + "code": "from langchain.prompts import PromptTemplate\ntemplate = PromptTemplate(input_variables=['name'], template='What is {name} famous for?')\nprint(template.format(name='Albert Einstein'))" |
| 26 | + } |
| 27 | + ] |
| 28 | + }, |
| 29 | + { |
| 30 | + "title": "প্রাথমিক কমান্ড এবং ইন্সটলেশন (Node.js)", |
| 31 | + "items": [ |
| 32 | + { |
| 33 | + "definition": "LangChain ইনস্টল করা", |
| 34 | + "code": "npm install langchain" |
| 35 | + }, |
| 36 | + { |
| 37 | + "definition": "OpenAI ইন্টিগ্রেশন", |
| 38 | + "code": "npm install openai" |
| 39 | + }, |
| 40 | + { |
| 41 | + "definition": "প্রাথমিক সেটআপ", |
| 42 | + "code": "const { OpenAI } = require('langchain/llms/openai');\nconst llm = new OpenAI({ temperature: 0.9 });\nconst text = 'Translate this into French.';\nllm.call(text).then(console.log);" |
| 43 | + } |
| 44 | + ] |
| 45 | + }, |
| 46 | + { |
| 47 | + "title": "চেইন এবং টেমপ্লেট ব্যবহারের উদাহরণ (Python)", |
| 48 | + "items": [ |
| 49 | + { |
| 50 | + "definition": "প্রম্পট টেমপ্লেট তৈরি করা", |
| 51 | + "code": "from langchain.prompts import PromptTemplate\ntemplate = PromptTemplate(input_variables=['name'], template='Who is {name}?')\nprint(template.format(name='Isaac Newton'))" |
| 52 | + }, |
| 53 | + { |
| 54 | + "definition": "LLM চেইন ব্যবহার করা", |
| 55 | + "code": "from langchain.chains import LLMChain\nchain = LLMChain(llm=llm, prompt=template)\nprint(chain.run('Marie Curie'))" |
| 56 | + } |
| 57 | + ] |
| 58 | + }, |
| 59 | + { |
| 60 | + "title": "চেইন এবং টেমপ্লেট ব্যবহারের উদাহরণ (Node.js)", |
| 61 | + "items": [ |
| 62 | + { |
| 63 | + "definition": "প্রম্পট টেমপ্লেট তৈরি করা", |
| 64 | + "code": "const { PromptTemplate } = require('langchain/prompts');\nconst template = new PromptTemplate({ inputVariables: ['name'], template: 'Who is {name}?' });\nconsole.log(template.format({ name: 'Nikola Tesla' }));" |
| 65 | + }, |
| 66 | + { |
| 67 | + "definition": "LLM চেইন ব্যবহার করা", |
| 68 | + "code": "const { LLMChain } = require('langchain/chains');\nconst chain = new LLMChain({ llm, prompt: template });\nchain.run('Galileo').then(console.log);" |
| 69 | + } |
| 70 | + ] |
| 71 | + } |
| 72 | + ] |
| 73 | +} |
0 commit comments