Skip to main content

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


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_moonshot-0.0.7-py3-none-any.whl (33.3 kB view details)

Uploaded Python 3

File details

Details for the file langchain_moonshot-0.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_moonshot-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a73a5b3b6908a4a3eaae2d915fc472b8813f13a25569e7e7f4578551654bb5fe
MD5 1e381ff97bdb908373a71a81925537ba
BLAKE2b-256 2131daba1534087cb2dec01ae8a5ef99017177957896ab4ad1f3cc0a304b8e6b

See more details on using hashes here.

Supported by

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