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]与我联系。