langsearch
1.0.0
Langsearchは、検索拡張生成(RAG)のPythonパッケージであり、非公開データのChatGPTのような大規模な言語モデル(LLMS)のパワーを活用するのに役立ちます。検索と生成のみを処理する他のパッケージとは異なり、このパッケージはデータの発見(クロールリングなど)、データの永続性(変更時にデータを更新するため)、およびデータの前処理も処理します。これは、配管がほとんどなく、実際のユースケースを迅速に始めることができることを意味します。
このパッケージは巨人の肩に立っており、次の有名なPythonパッケージとオープンソースツールを使用して、重い持ち上げを行います。
LangSearchはカスタマイズ可能で拡張可能です。ほぼすべての側面は、設定を介して変更可能です。また、カスタムクローラーとカスタムプレプレセッサのセットアップもサポートしています。
たとえば、LangchainドキュメントでRAGを実行するためのコードはこれほど簡単です。
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]で私に連絡できます。