Skip to main content

No project description provided

Project description

langchain-wenxin - Langchain Baidu WENXINWORKSHOP wrapper

PyPI - Version PyPI - Python Version


Table of Contents

Installation

pip install langchain-wenxin

Document

WENXINWORKSHOP API: https://cloud.baidu.com/doc/WENXINWORKSHOP/s/flfmc9do2

How to use

export BAIDU_API_KEY="xxxxx"                            
export BAIDU_SECRET_KEY="xxxxx"
from langchain_wenxin.llms import Wenxin,ChatWenxin

# Wenxin model
llm = Wenxin()
print(llm("你好"))

# Wenxin chat model
from langchain.schema import HumanMessage
llm = ChatWenxin()
print(llm([HumanMessage(content="你好")]))

License

langchain-wenxin is distributed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_wenxin-0.0.1.tar.gz (7.7 kB view hashes)

Uploaded Source

Built Distribution

langchain_wenxin-0.0.1-py3-none-any.whl (6.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page