mirror of
https://github.com/kou029w/daraz-llm.git
synced 2025-01-18 16:08:15 +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": {
|
"imports": {
|
||||||
"@slack/bolt": "npm:@slack/bolt@^3.17.1",
|
"@slack/bolt": "npm:@slack/bolt@^3.19.0",
|
||||||
"groq-sdk": "npm:groq-sdk@^0.3.2"
|
"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 bolt from "npm:@slack/bolt";
|
||||||
import { Groq } from "npm:groq-sdk";
|
import { Groq } from "npm:groq-sdk";
|
||||||
|
|
||||||
type Messages = Array<Groq.Chat.CompletionCreateParams.Message>;
|
type Messages = Array<Groq.Chat.ChatCompletionMessageParam>;
|
||||||
|
|
||||||
const groq = new Groq({
|
const groq = new Groq({
|
||||||
apiKey: GROQ_API_KEY,
|
apiKey: GROQ_API_KEY,
|
||||||
|
@ -41,7 +41,7 @@ const groq = new Groq({
|
||||||
});
|
});
|
||||||
const kv = await Deno.openKv();
|
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({
|
const res = await groq.chat.completions.create({
|
||||||
model,
|
model,
|
||||||
messages: [{ role: "system", content: system }, ...messages],
|
messages: [{ role: "system", content: system }, ...messages],
|
||||||
|
|
Loading…
Add table
Reference in a new issue