mirror of
https://github.com/kou029w/daraz-llm.git
synced 2025-01-18 08:05:12 +00:00
update dependencies
This commit is contained in:
parent
eb45fa8154
commit
d36181064f
2 changed files with 4 additions and 4 deletions
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
4
main.ts
4
main.ts
|
@ -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],
|
||||
|
|
Loading…
Add table
Reference in a new issue