update dependencies

This commit is contained in:
Nebel 2024-07-28 15:33:14 +09:00
parent eb45fa8154
commit d36181064f
Signed by: nebel
GPG key ID: 79807D08C6EF6460
2 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
{
"imports": {
"@slack/bolt": "npm:@slack/bolt@^3.17.1",
"groq-sdk": "npm:groq-sdk@^0.3.2"
"@slack/bolt": "npm:@slack/bolt@^3.19.0",
"groq-sdk": "npm:groq-sdk@^0.5.0"
}
}

View file

@ -33,7 +33,7 @@ ${system}`;
import bolt from "npm:@slack/bolt";
import { Groq } from "npm:groq-sdk";
type Messages = Array<Groq.Chat.CompletionCreateParams.Message>;
type Messages = Array<Groq.Chat.ChatCompletionMessageParam>;
const groq = new Groq({
apiKey: GROQ_API_KEY,
@ -41,7 +41,7 @@ const groq = new Groq({
});
const kv = await Deno.openKv();
async function chat(messages: Messages): Promise<string> {
async function chat(messages: Messages): Promise<string | null> {
const res = await groq.chat.completions.create({
model,
messages: [{ role: "system", content: system }, ...messages],