Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

community[minor]: Add Moonshot chat models integration #5239

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

crazyurus
Copy link

Moonshot is a Chinese startup that provides LLM service for companies and individuals. See https://platform.moonshot.cn/docs/intro.

Langchain Python already has Moonshot integration. See https://python.langchain.com/docs/integrations/chat/moonshot/

So complete this integration in the Javascript version

Copy link

vercel bot commented Apr 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 21, 2024 0:11am
langchainjs-docs ✅ Ready (Inspect) Visit Preview May 21, 2024 0:11am


moonshotApiKey?: string;

apiKey?: string;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why two different variables?

Copy link
Author

@crazyurus crazyurus May 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I saw that some model parameters in langchain provide this alias name apiKey(such as baiduwenxin zhipuai minimax), and some do not(such as alibabatongyi), so retained here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just use apiKey - we're trying to standardize parameter names more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moonshotApiKey removed.

}

_llmType(): string {
return "Moonshot";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: lower-case

@jacoblee93
Copy link
Collaborator

Hey, I'm very sorry for the delay - I was on vacation and then we had a lot to do for the launch of 0.2.0. Small comments but looks good otherwise! I can update this tomorrow unless you beat me to it.

@jacoblee93 jacoblee93 added the close PRs that need one or two touch-ups to be ready label May 20, 2024
@jacoblee93 jacoblee93 changed the title Add Moonshot chat models integration community[minor]: Add Moonshot chat models integration May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features close PRs that need one or two touch-ups to be ready size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants