An integration package connecting Moonshot AI and LangChain
Project description
langchain-moonshot
This package contains the LangChain integrations for MoonshotAI through the openai
SDK.
Installation and Setup
- Install the LangChain partner package
pip install langchain-moonshot
- Get a Moonshot api key and set it as an environment variable (
MOONSHOT_API_KEY
) - Get a Moonshot base url and set it as an environment variable (
MOONSHOT_API_BASE
)
LLM
See a usage example.
from langchain_moonshot import OpenAI
Obsolete: If you are using a model hosted on Azure
, you should use different wrapper for that:
from langchain_openai import AzureOpenAI
For a more detailed walkthrough of the Azure
wrapper, see here
Chat model
See a usage example.
from langchain_moonshot import ChatOpenAI
Obsolete: If you are using a model hosted on Azure
, you should use different wrapper for that:
from langchain_openai import AzureChatOpenAI
For a more detailed walkthrough of the Azure
wrapper, see here
Text Embedding Model
See a usage example
from langchain_moonshot import OpenAIEmbeddings
Obsolete: If you are using a model hosted on Azure
, you should use different wrapper for that:
from langchain_openai import AzureOpenAIEmbeddings
For a more detailed walkthrough of the Azure
wrapper, see here
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file langchain_moonshot-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: langchain_moonshot-0.0.7-py3-none-any.whl
- Upload date:
- Size: 33.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a73a5b3b6908a4a3eaae2d915fc472b8813f13a25569e7e7f4578551654bb5fe |
|
MD5 | 1e381ff97bdb908373a71a81925537ba |
|
BLAKE2b-256 | 2131daba1534087cb2dec01ae8a5ef99017177957896ab4ad1f3cc0a304b8e6b |