This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| env/bin/pip install huggingface-hub langchain-postgres langchain-ollama ollama langchain-openai langchain-anthropic flashrank dotenv | |
| Buat token di huggingface.co, gratis. Contoh mengunduh kategori 24 (Biografi Nabi): | |
| HF_TOKEN=token-milik-mu env/bin/hf download AuthenticIlm/Shamela4_Full_DB \ | |
| --repo-type dataset --include "24__*" --local-dir maktabah_syamilah | |
| Pasang ekstensi Postgres yang diperlukan: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # pip install meteostat | |
| import sys | |
| from datetime import ( | |
| datetime, | |
| date, | |
| timedelta, | |
| ) | |
| from argparse import ArgumentParser | |
| from datetime import date | |
| import meteostat as ms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| pip install langchain-ollama langchain-openai dotenv | |
| Bila menggunakan ChatGPT maka buat file .env berisi: | |
| OPENAI_API_KEY=api-key-milikmu | |
| """ | |
| import os | |
| import sys | |
| from time import time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| env/bin/pip install huggingface-hub flashrank langchain-chroma langchain-ollama ollama langchain-openai dotenv | |
| Contoh mengunduh kategori 24 (Biografi Nabi): | |
| env/bin/hf download AuthenticIlm/Shamela4_Full_DB \ | |
| --repo-type dataset \ | |
| --include "24__*" \ | |
| --local-dir maktabah_syamilah |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # pip install ebooklib beautifulsoup4 langchain-text-splitters flashrank langchain-chroma langchain-ollama ollama | |
| import sys | |
| import os | |
| from time import time | |
| from datetime import datetime | |
| from argparse import ArgumentParser | |
| import numpy as np | |
| import ebooklib | |
| from ebooklib import epub | |
| from bs4 import BeautifulSoup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # pip install beautifulsoup4 lxml requests python-dotenv google-genai | |
| import sys | |
| from argparse import ArgumentParser | |
| import requests | |
| from bs4 import BeautifulSoup | |
| from dotenv import load_dotenv | |
| from google import genai | |
| DEL_TAGS = ["script", "head", "iframe", "noscript"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # pip install beautifulsoup4 lxml ollama requests | |
| import sys | |
| from argparse import ArgumentParser | |
| import requests | |
| from bs4 import BeautifulSoup | |
| import ollama | |
| DEL_TAGS = ["script", "head", "iframe", "noscript"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # pip install langchain-openai python-dotenv beautifulsoup4 lxml requests | |
| import sys | |
| import os | |
| from time import time | |
| from argparse import ArgumentParser | |
| from bs4 import BeautifulSoup | |
| from langchain_openai import ChatOpenAI | |
| from dotenv import load_dotenv | |
| import requests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Buat Virtual Environment: | |
| python3.13 -m venv env | |
| env/bin/pip install psycopg2-binary sqlalchemy langchain-core langchain-ollama langgraph langchain ollama | |
| File conf.ini: | |
| [main] | |
| db_url = postgresql://user:pass@localhost:5432/db |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # pip install langchain-text-splitters langchain-chroma langchain-ollama ollama flashrank | |
| """ | |
| Contoh riwayat percakapan dalam file JSON: | |
| [ | |
| { | |
| "id": 1, | |
| "timestamp": "2022-07-12 05:55", | |
| "sender": "Owo Sugiana", |
NewerOlder