langsearch
1.0.0
Langsearch是用於檢索增強發電(RAG)的Python軟件包,可用於在非公開數據上利用大語模型(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]與我聯繫。