LangSearch เป็นแพ็คเกจ Python สำหรับการเรียกคืน Augmented Generation (RAG) ซึ่งมีประโยชน์สำหรับการควบคุมพลังของโมเดลภาษาขนาดใหญ่ (LLMS) เช่น ChatGPT บนข้อมูลที่ไม่ใช่สาธารณะ ซึ่งแตกต่างจากแพ็คเกจอื่น ๆ ที่ดูแลการดึงและการสร้างแพ็คเกจนี้ยังดูแลการค้นพบข้อมูล (เช่นการรวบรวมข้อมูล) การคงอยู่ของข้อมูล (สำหรับการอัปเดตข้อมูลเมื่อมีการเปลี่ยนแปลง) และการประมวลผลข้อมูลล่วงหน้า ซึ่งหมายความว่าคุณสามารถเริ่มต้นกับกรณีการใช้โลกแห่งความเป็นจริงได้อย่างรวดเร็วโดยมีระบบประปาน้อยมาก
แพ็คเกจนี้ตั้งอยู่บนไหล่ของไจแอนต์และใช้แพ็คเกจ Python ที่รู้จักกันดีและเครื่องมือโอเพ่นซอร์สเพื่อทำการยกหนัก
Langsearch สามารถปรับแต่งได้และขยายได้ เกือบทุกด้านสามารถแก้ไขได้ผ่านการตั้งค่า นอกจากนี้ยังรองรับการตั้งค่าการรวบรวมข้อมูลที่กำหนดเองและตัวประมวลผลล่วงหน้าที่กำหนดเอง
ตัวอย่างเช่นรหัสสำหรับการทำผ้าขี้ริ้วในเอกสาร Langchain เป็นเรื่องง่าย
crawler.py from langsearch . spiders import WebSpider
class Crawler ( WebSpider ):
name = "langchain"settings.py from langsearch . pipelines import assemble , DetectItemTypePipeline , GenericHTMLPipeline
LANGSEARCH_WEB_SPIDER_START_URLS = [ "https://python.langchain.com/docs/get_started/introduction" ]
LANGSEARCH_WEB_SPIDER_LINK_EXTRACTOR_ALLOW = [
"https://python.langchain.com/docs/get_started" ,
"https://python.langchain.com/docs/modules" ,
"https://python.langchain.com/docs/guides" ,
"https://python.langchain.com/docs/ecosystem" ,
"https://python.langchain.com/docs/additional_resources"
]
AUTOTHROTTLE_ENABLED = True
ITEM_PIPELINES = {
DetectItemTypePipeline : 100 ,
** assemble ( GenericHTMLPipeline )
} >>> from langsearch.chains import QAChain
>>> chain_output = QAChain()({"question": "How can I install langchain?"})
>>> print(chain_output["output_text"])
To install LangChain, you can use either conda or pip.
If you prefer using conda, you can run the following command:
conda install langchain -c conda-forge
If you prefer using pip, there are two options depending on the modules you need.
To install the modules needed for the common LLM providers, you can run:
pip install langchain[llms]
To install all modules needed for all integrations, you can run:
pip install langchain[all]
Note that if you are using zsh, you'll need to quote square brackets when passing them as an argument to a command. For example:
pip install 'langchain[all]'
pip install langsearch
เอกสารของเรา (WIP) สามารถพบได้ที่นี่ ตัวอย่างรหัสอยู่ในโฟลเดอร์ examples ระดับบนสุด
text2vec-transformers (สำหรับข้อความ) และรุ่น CLIP สำหรับรูปภาพเรามีความสุขมากที่ได้รับการสนับสนุนจากชุมชน โปรดลองใช้แพ็คเกจเปิดข้อบกพร่องดึงคำขอ (แม้กระทั่งการปรับปรุงเอกสารช่วยได้มาก) คุณสามารถติดต่อฉันได้ตลอดเวลาที่ [email protected] หากคุณต้องการความช่วยเหลือใด ๆ