Saravanan666/pypi-org huggingface dataset:
Package: langauge
LanGaugeLanGauage: NLP experiment platform. To be open-sourced publicly (Apache 2.0 or similar).ArchitectureWhat is it?Natural Language Processing (NLP) is one of the most important fields of research in today’s world. It has many applications such as chatbots, sentiment analysis, and document classification.LanGauge is a web application leveraging Natural Language Processing (NLP) to reduce the time spent analyzing medical research papers in an easy-to-use fashion. This free, open-source platform helps researchers in fields such as drug discovery curate their data to secure and scale the development of health solution. An example application would be enhancing COVID-19 research using multiple NLP models on medical datasets.We want to use the language processing models to “gauge” the usefulness of open-source medical datasets for the researchers.How to run the project using pip ?Create (or navigate to) a folder you would like to use with LanGauge and create a virtual environmentOn Linux usepython3-mvenvenvand activate it usingsourceenv/bin/activateInstall usingpipinstalllangaugeNow, Run the following command line instruction
for starting the front endlangauge ui [OPTIONS]

Options:
-h, --host TEXT          The network address to listen on (default:
                         127.0.0.1). Use 0.0.0.0 to bind to all addresses if
                         you want to access the tracking server from other
                         machines.

-p, --port INTEGER       The UI port to configure on (default:8080)

-b --backend TEXT        The backend address & port to listen on
                         requests (default: 127.0.0.1:5000).

--help                   Show this message and exit.and for the backend uselangauge backend [OPTIONS]

Options:
-bp, --backendport INTEGER  The backend port to configure on (default:5000)or using docker-compose?Clone the repository.gitclonehttps://github.com/flapmx/LanGauge-INTERNAL.gitEnsure you have docker and docker-compose installed.Move to langauge directorycdlangaugeBuild and Launch the projectdocker-composeup--build-dHow to access the application?http://localhost:8080for the React front endhttp://localhost:5000for the Flask back endhttp://localhost:5555for the monitoring CeleryHow to shut down?docker-composedown
Package: langBOTs
LangBOTsA silly library which combines scraping, langchain and flask.
Inspired byprompt engineeringInstallationUse the package managerpipto install.pipinstalllangBOTsUsageDefault scrapes from example.comfromlangBOTs.scrapsplitvecimportSSVfromlangBOTs.queryimportQueryfromlangBOTs.chainimportMDLretriever=SSV(chunk_size=400,chunk_overlap=100)ret=retriever.ret()chain=MDL(retriever=ret,device=0).chain()Q=Query(chain=chain)Q.qury("hello how are you")APINote: Requiresngroktoken for tunneling.$ ngrok config add-authtoken <enter auth-token>also make sure you have flask pyngrok flask_ngrok flask_cors (1 of them is not rquired ig)fromlangBOTs.queryimportAPIfromlangBOTs.queryimportprocess_second_stringfromlangBOTs.queryimportstartr=API(qury_object="Q")start(r)I will post details on how to change the model and other aprameters soon.Flow(scrape->load->split->[dwnld_instructor_e]->create_vec_graph->save(optional)->[download_model->]initialise_chain->query->)->apiContributingYoLicenseMITByRajat
Package: langchain-ai21
langchain-ai21This package contains the LangChain integrations forAI21through theirAI21SDK.Installation and SetupInstall the AI21 partner packagepipinstalllangchain-ai21Get an AI21 api key and set it as an environment variable (AI21_API_KEY)Chat ModelsThis package contains theChatAI21class, which is the recommended way to interface with AI21 Chat models.To use, install the requirements, and configure your environment.exportAI21_API_KEY=your-api-keyThen initializefromlangchain_core.messagesimportHumanMessagefromlangchain_ai21.chat_modelsimportChatAI21chat=ChatAI21(model="j2-ultra")messages=[HumanMessage(content="Hello from AI21")]chat.invoke(messages)LLMsYou can use AI21's generative AI models as Langchain LLMs:fromlangchain.promptsimportPromptTemplatefromlangchain_ai21importAI21LLMllm=AI21LLM(model="j2-ultra")template="""Question:{question}Answer: Let's think step by step."""prompt=PromptTemplate.from_template(template)chain=prompt|llmquestion="Which scientist discovered relativity?"print(chain.invoke({"question":question}))EmbeddingsYou can use AI21's embeddings models as:Queryfromlangchain_ai21importAI21Embeddingsembeddings=AI21Embeddings()embeddings.embed_query("Hello! This is some query")Documentfromlangchain_ai21importAI21Embeddingsembeddings=AI21Embeddings()embeddings.embed_documents(["Hello! This is document 1","And this is document 2!"])
Package: langchain-airbyte
langchain-airbyteThis package contains the LangChain integration with AirbyteInstallationpipinstall-Ulangchain-airbyteThe integration package doesn't have any global environment variables that need to be
set, but some integrations (e.g.source-github) may need credentials passed in.Document LoadersAirbyteLoaderclass exposes a single document loader for Airbyte sources.fromlangchain_airbyteimportAirbyteLoaderloader=AirbyteLoader(source="source-faker",stream="users",config={"count":100},)docs=loader.load()
Package: langchain-anthropic
langchain-anthropicThis package contains the LangChain integration for Anthropic's generative models.Installationpip install -U langchain-anthropicChat ModelsAPI Model NameModel Familyclaude-instant-1.2Claude Instantclaude-2.1Claudeclaude-2.0ClaudeTo use, you should have an Anthropic API key configured. Initialize the model as:from langchain_anthropic import ChatAnthropicMessages
from langchain_core.messages import AIMessage, HumanMessage

model = ChatAnthropicMessages(model="claude-2.1", temperature=0, max_tokens=1024)Define the input messagemessage = HumanMessage(content="What is the capital of France?")Generate a response using the modelresponse = model.invoke([message])For a more detailed walkthrough seehere.
Package: langchain-astradb
langchain-astradbThis package contains the LangChain integrations for using DataStax Astra DB.DataStaxAstra DBis a serverless vector-capable database built on Apache Cassandra® and made conveniently available
through an easy-to-use JSON API.Note.For a short transitional period, only some of the Astra DB integration classes are contained in this package (the remaining ones being still inlangchain-community). In a short while, and surely by version 0.2 of LangChain, all of the Astra DB support will be removed fromlangchain-communityand included in this package.Installation and SetupInstallation of this partner package:pipinstalllangchain-astradbIntegrations overviewVector Storefromlangchain_astradb.vectorstoresimportAstraDBVectorStoremy_store=AstraDBVectorStore(embedding=my_embeddings,collection_name="my_store",api_endpoint="https://...",token="AstraCS:...",)ReferenceSee theLangChain docs pagefor a more detailed listing.
Package: langchain-baichuanai
LangChain - Baichuan AILangChain interface for Baichuan AIInstallationpipinstalllangchain-baichuanaiQuickstartimportlangchain_baichuanaiLicenseLangChain - Baichuan AI has a BSD-3-Clause license, as found in theLICENSEfile.ContributingChangelog
Package: langchain-benchmarks
🦜💯 LangChain Benchmarks📖 DocumentationA package to help benchmark various LLM related tasks.The benchmarks are organized by end-to-end use cases, and
utilizeLangSmithheavily.We have several goals in open sourcing this:Showing how we collect our benchmark datasets for each taskShowing what the benchmark datasets we use for each task isShowing how we evaluate each taskEncouraging others to benchmark their solutions on these tasks (we are always looking for better ways of doing things!)InstallationTo install the packages, run the following command:pipinstall-Ulangchain-benchmarksAll the benchmarks come with an associated benchmark dataset stored inLangSmith. To take advantage of the eval and debugging experience,sign up, and set your API key in your environment:exportLANGCHAIN_API_KEY=ls-...Repo StructureThe package is located withinlangchain_benchmarks. Check out thedocsfor information on how to get starte.The other directories are legacy and may be moved in the future.ArchivedBelow are archived benchmarks that require cloning this repo to run.CSV Question AnsweringExtractionQ&A over the LangChain docsMeta-evaluation of 'correctness' evaluatorsRelatedFor cookbooks on other ways to test, debug, monitor, and improve your LLM applications, check out theLangSmith docsFor information on building with LangChain, check out thepython documentationorJS documentation
Package: langchain-chatglm
langchain-ChatGLMesay use ChatGLM in LangChain.ChatGLM2-6BlangchainInstall Requirementpip install -r requirements.txtUsagefromchatglm_piplineimportChatGLMPipelinefromlangchainimportPromptTemplate,LLMChainfromlangchain.callbacks.managerimportCallbackManagerfromlangchain.callbacks.streaming_stdoutimportStreamingStdOutCallbackHandlercallback_manager=CallbackManager([StreamingStdOutCallbackHandler()])llm=ChatGLMPipeline.from_model_id(model_id="THUDM/chatglm2-6b",device=-1,# if use GPU set to 0model_kwargs={"temperature":0,"max_length":64,"trust_remote_code":True},callback_manager=callback_manager,verbose=True,)template="""问:{question}答: 让我们一步一步地思考."""prompt=PromptTemplate(template=template,input_variables=["question"])llm_chain=LLMChain(prompt=prompt,llm=llm)question="华晨宇和张碧晨是什么关系?"llm_chain.run(question)model_kwargskeyvaluesremark"device""cuda"使用cuda加速"float"True,False使用cpu推理"quantize"8量化
Package: langchain-chatgpt-browser-api
Langchain LLMDescriptionChatGPT Browser API is a Python library that allows you to use Langchain with the ChatGPT instance in your browser.With a Plus subscription, you can take advantage of GPT4 without the need for an API key.InstallationYou can install ChatGPT Browser API via pip. Run the following command to install it:pip install chatgpt-browser-apiEnsure that you have Python 3.6 or a higher version installed on your system.UsageOnce installed, you can import ChatGPT Browser API. Here's a basic example to get you started:fromchatgpt_browser_apiimportBaseChatGPT# Create an instance of LangchainLLMllm=BaseChatGPT(chatgpt_web_api_url="http://localhost:3001")answer=chatgpt("Write your prompt here")print(answer)To start the web server located at chatgpt_web_api_url, seeChatGPT-Web-APIContributingContributions are welcome! If you have any ideas, bug reports, or feature requests, please open an issue or submit a pull request on GitHub.LicenseThis library is licensed under the MIT License. See the LICENSE file for more information.Please note that you may need to replace certain sections, such as the license badge and the GitHub repository link, with the appropriate information for your project.
Package: langchain_chinese
🦜🇨🇳 LangChain-Chineselangchain_chinese的目标是提供中文大语言模型和中文友好的langchain工具。为什么做这个项目？OpenAI 的大模型在引领潮流的同时，中国国内也涌现了很多优秀的大模型，
这些大模型的接口更新变化太快了，以至于 langchain 这样的框架经常无法及时更新到最新。为了方便国内用户，我计划在 langchain_chinese 这个项目中将主要的几个中国大模型做好集成和更新维护。模型目前支持的只有智谱AI，很快会更新通义千问、文心一言等其他的大模型。智谱通用大模型glm-3-turboglm-4路线图智谱AI的V4版本通用大模型所有参数都支持了，但还需要做其他的工作：支持所有参数设置支持同步方法支持异步方法支持流方法支持智谱的Tool回调支持事件流的callback支持内置的search工具支持内置的检索工具支持图片生成能力支持调用中的异常提供便利的bind_tools方法提供基于Tool调用的Agent...有计划，但尚未支持的模型：阿里云积灵各类模型阿里云百炼各类模型千帆各类模型文心一言讯飞星火安装你可以使用 pip 安装：pip install -U langchain_chinese或者使用 poetry 安装：poetry add langchain_chinese@latest使用langchain_chinese时，请不要单独安装 zhipuai 包由于 langserve 要求使用 pydantic_v1，否则存在很多兼容性问题，
因此特意专门克隆了该项目，并做出少许修改，以便将 pydantic 从 v2 降级到 v1 。在安装 langchain_chinese 时已经自动选择了上述修改过的兼容版本，因此不要单独安装 zhipuai 的包。如果不经过这个处理，你就必须安装 v2 版本的pydantic来兼容 zhipuai，于是在 langserve 时你会发现无法生成API文档。使用invokefromlangchain_chineseimportChatZhipuAIllm=ChatZhipuAI()llm.invoke("讲个笑话来听吧")AIMessage(content='好的，我来给您讲一个幽默的笑话：\n\n有一天，小明迟到了，老师问他：“你为什么迟到？”\n小明回答说：“老师，我今天看到一块牌子上写着‘学校慢行’，所以我就慢慢地走来了。”')streamllm.invoke("讲个笑话来听吧")使用工具tools=[{"type":"function","function":{"name":"query_train_info","description":"根据用户提供的信息，查询对应的车次","parameters":{"type":"object","properties":{"departure":{"type":"string","description":"出发城市或车站",},"destination":{"type":"string","description":"目的地城市或车站",},"date":{"type":"string","description":"要查询的车次日期",},},"required":["departure","destination","date"],},}}]llm=ChatZhipuAI().bind(tools=tools)llm.invoke("你能帮我查询2024年1月1日从北京南站到上海的火车票吗？")RunnableBinding(bound=ChatZhipuAI(client=<zhipuai._client.ZhipuAIobjectat0x11014fc40>),kwargs={'tools':[{'type':'function','function':{'name':'query_train_info','description':'根据用户提供的信息，查询对应的车次','parameters':{'type':'object','properties':{'departure':{'type':'string','description':'出发城市或车站'},'destination':{'type':'string','description':'目的地城市或车站'},'date':{'type':'string','description':'要查询的车次日期'}},'required':['departure','destination','date']}}}]})
Package: langchain-community
🦜️🧑‍🤝‍🧑 LangChain CommunityQuick Installpipinstalllangchain-communityWhat is it?LangChain Community contains third-party integrations that implement the base interfaces defined in LangChain Core, making them ready-to-use in any LangChain application.For full documentation see theAPI reference.📕 Releases & Versioninglangchain-communityis currently on version0.0.xAll changes will be accompanied by a patch version increase.💁 ContributingAs an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.For detailed information on how to contribute, see theContributing Guide.
Package: langchain-contrib
langchain-contribA collection of utilities that are too experimental forlangchain proper, but are nonetheless generic enough to potentially be useful for multiple projects. Currently consists of code dumped fromZAMM, but is of course open to contributions with lax procedures.Quickstartpipinstalllangchain-contribTo add interop withvcr-langchain, simply install it as well:pipinstallvcr-langchain
Package: langchain-discord
Discord LangchainDiscord Langchain is a tool for Langchain to use Discord in agents.
It is currently in development and bugs may encounter.
If you find any bugs, please report it to theissues.
Thanks for all your support!Installation (and example)Install the package from PyPI.$python3-mpipinstalllangchain-discordImport the packagefromlangchain_discordimportDiscordWebhookTool... and all other required packages for the examplefromlangchainimportOpenAIfromlangchain.agentsimportinitialize_agent,AgentTypeimportosInitialize and environment variablestools=[DiscordWebhookTool()]llm=OpenAI(temperature=0)agent=initialize_agent(tools,llm,agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION,verbose=True)os.environ["WEBHOOK_URL"]="https://discord.com/api/webhooks/<use the webhook url from your discord server>"os.environ["WEBHOOK_USERNAME"]="LangChain Agent"Run the agentagent.run("Post a joke to the webhook!")NoticeThis package is in development, more info above.
Currently the package was only tested on theZERO_SHOT_REACT_DESCRIPTIONagent.
I'm currently working to add a custom output parser, so it can be used on other agents.Support this projectYou can support this project by giving a star to this repository, or by reporting all bugs.
I am the only developer of this project, so it may take a while to fix bugs.
You can find more info on myTwitter, or on mywebsite.
Donations are also welcome, you can donate to myBuyMeACoffee.LicenseI don't know a lot about licenses, so I just used the MIT license.
In general it's free to use (both private and for enterprise), but you can't claim it as your own.
Package: langchain-elasticsearch
langchain-elasticsearchThis package contains the LangChain integration with Elasticsearch.Installationpipinstall-Ulangchain-elasticsearchTODO document how to get id and keyUsageTheElasticsearchStoreclass exposes the connection to the Pinecone vector store.fromlangchain_elasticsearchimportElasticsearchStoreembeddings=...# use a LangChain Embeddings classvectorstore=ElasticsearchStore(es_cloud_id="your-cloud-id",es_api_key="your-api-key",index_name="your-index-name",embeddings=embeddings,)
Package: langchain-experimental
🦜️🧪 LangChain ExperimentalThis package holds experimental LangChain code, intended for research and experimental
uses.[!WARNING]
Portions of the code in this package may be dangerous if not properly deployed
in a sandboxed environment. Please be wary of deploying experimental code
to production unless you've taken appropriate precautions and
have already discussed it with your security team.Some of the code here may be marked with security notices. However,
given the exploratory and experimental nature of the code in this package,
the lack of a security notice on a piece of code does not mean that
the code in question does not require additional security considerations
in order to be safe to use.
Package: langchain-fireworks
LangChain-FireworksThis is the partner package for tying Fireworks.ai and LangChain. Fireworks really strive to provide good support for LangChain use cases, so if you run into any issues please let us know. You can reach out to usin our Discord channelBasic LangChain-Fireworks exampleAdvancedTool use: LangChain Agent + Fireworks function calling modelPlease checkout how to teach Fireworks function calling model to use acalculator here.Fireworks focus on delivering the best experience for fast model inference as well as tool use. You can check outour blogfor more details on how it fares compares to GPT-4, the punchline is that it is on par with GPT-4 in terms just function calling use cases, but it is way faster and much cheaper.RAG: LangChain agent + Fireworks function calling model + MongoDB + Nomic AI embeddingsPlease check out thecookbook herefor an end to end flow
Package: langchain-google-bigtable
Cloud Bigtable for LangChainThis package contains theLangChainintegrations for Cloud Bigtable.🧪 Preview:This feature is covered by the Pre-GA Offerings Terms of the Google Cloud Terms of Service. Please note that pre-GA products and features might have limited support, and changes to pre-GA products and features might not be compatible with other pre-GA versions. For more information, see thelaunch stage descriptionsDocumentationAPI ReferenceGetting StartedIn order to use this library, you first need to go through the following steps:Select or create a Cloud Platform project.Enable billing for your project.Enable the Google Cloud Bigtable API.Setup Authentication.InstallationInstall this library in avirtualenvusing pip.virtualenvis a tool to
create isolated Python environments. The basic problem it addresses is one of
dependencies and versions, and indirectly permissions.Withvirtualenv, it's possible to install this library without needing system
install permissions, and without clashing with the installed system
dependencies.pipinstallvirtualenv
virtualenv<your-env>source<your-env>/bin/activate
<your-env>/bin/pipinstalllangchain-google-bigtableDocument Loader UsageUse a document loader to load data as LangChainDocuments.fromlangchain_google_bigtableimportBigtableLoaderloader=BigtableLoader(instance_id="my-instance",table_name="my-table-name")docs=loader.lazy_load()See the fullDocument Loadertutorial.Chat Message History UsageUseChatMessageHistoryto store messages and provide conversation history to LLMs.fromlangchain_google_bigtableimportBigtableChatMessageHistoryhistory=BigtableChatMessageHistory(instance_id="my-instance",table_name="my-message-store",session_id="my-session_id")See the fullChat Message Historytutorial.ContributingContributions to this library are always welcome and highly encouraged.SeeCONTRIBUTINGfor more information how to get started.Please note that this project is released with a Contributor Code of Conduct. By participating in
this project you agree to abide by its terms. SeeCode of Conductfor more
information.LicenseApache 2.0 - SeeLICENSEfor more information.DisclaimerThis is not an officially supported Google product.
Package: langchain-google-calendar-tools
Langchain Google Calendar ToolsThis repo walks through connecting to the Google Calendar API.Installationpip install langchain-google-calendar-toolsFor local development:pip install -e .How to useCreate a Google Cloud project and enable Google Calendar API.To get Oauth credentials for the Desktop app, please referhttps://developers.google.com/calendar/api/guides/overviewfor detail.Download the credentials file to./notebooksand rename it tocredentials.json. If you want to keep its original file name, please replace the value ofclient_secrets_fileindemo.ipynbwith the valid path which points to the credentials file.Run this notebook to perform the listed functionsLimitationsDue to the short development time, some of the following parts have not been completed and will be improved in the future:Timezone: Currently being fixed to Vietnam's timezone, it will be taken from the user's Calendar or the system in the futureUpdate recurring events:  has not been implemented yetFunctions related to inviting others and responding to invitations have not been implementedLicenselangchain-google-calendar-toolsis distributed under the terms of theMITlicense.
Package: langchain-google-cloud-sql-mssql
Cloud SQL for SQL Server for LangChainThis package contains theLangChainintegrations for Cloud SQL for SQL Server.🧪 Preview:This feature is covered by the Pre-GA Offerings Terms of the Google Cloud Terms of Service. Please note that pre-GA products and features might have limited support, and changes to pre-GA products and features might not be compatible with other pre-GA versions. For more information, see thelaunch stage descriptionsDocumentationAPI ReferenceGetting StartedIn order to use this library, you first need to go through the following steps:Select or create a Cloud Platform project.Enable billing for your project.Enable the Google Cloud SQL API.Setup Authentication.InstallationInstall this library in avirtualenvusing pip.virtualenvis a tool to
create isolated Python environments. The basic problem it addresses is one of
dependencies and versions, and indirectly permissions.Withvirtualenv, it's possible to install this library without needing system
install permissions, and without clashing with the installed system
dependencies.pipinstallvirtualenv
virtualenv<your-env>source<your-env>/bin/activate
<your-env>/bin/pipinstalllangchain-google-cloud-sql-mssqlDocument Loader UsageUse adocument loaderto load data as LangChainDocuments.fromlangchain_google_cloud_sql_mssqlimportMSSQLEngine,MSSQLLoaderengine=MSSQLEngine.from_instance("project-id","region","my-instance","my-database","db_user","db_pass")loader=MSSQLLoader(engine,table_name="my-table-name")docs=loader.lazy_load()See the fullDocument Loadertutorial.Chat Message History UsageUseChatMessageHistoryto store messages and provide conversation history to LLMs.fromlangchain_google_cloud_sql_mssqlimportMSSQLChatMessageHistory,MSSQLEngineengine=MSSQLEngine.from_instance("project-id","region","my-instance","my-database","db_user","db_pass")history=MSSQLChatMessageHistory(engine,table_name="my-message-store",session_id="my-session_id")See the fullChat Message Historytutorial.ContributingContributions to this library are always welcome and highly encouraged.SeeCONTRIBUTINGfor more information how to get started.Please note that this project is released with a Contributor Code of Conduct. By participating in
this project you agree to abide by its terms. SeeCode of Conductfor more
information.LicenseApache 2.0 - SeeLICENSEfor more information.DisclaimerThis is not an officially supported Google product.