You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
apiKey: "YOUR-API-KEY",// In Node.js defaults to process.env.MOONSHOT_API_KEY
7
+
});
8
+
9
+
// Use moonshot-v1-128k
10
+
constmoonshotV1128k=newChatMoonshot({
11
+
apiKey: "YOUR-API-KEY",// In Node.js defaults to process.env.MOONSHOT_API_KEY
12
+
model: "moonshot-v1-128k",// Available models: moonshot-v1-8k, moonshot-v1-32k, moonshot-v1-128k
13
+
temperature: 0.3,
14
+
});
15
+
16
+
constmessages=[newHumanMessage("Hello")];
17
+
18
+
constres=awaitmoonshotV18K.invoke(messages);
19
+
/*
20
+
AIMessage {
21
+
content: "Hello! How can I help you today? Is there something you would like to talk about or ask about? I'm here to assist you with any questions you may have.",
22
+
}
23
+
*/
24
+
25
+
constres2=awaitmoonshotV1128k.invoke(messages);
26
+
/*
27
+
AIMessage {
28
+
text: "Hello! How can I help you today? Is there something you would like to talk about or ask about? I'm here to assist you with any questions you may have.",
0 commit comments