Skip to content

Commit

Permalink
su
Browse files Browse the repository at this point in the history
  • Loading branch information
waki285 committed Aug 3, 2023
1 parent c21f9a1 commit 7aa6939
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,27 @@ app.post("/interactions", async (c) => {
const models = jsonData.data
.filter((x: { object: "model" }) => x.object === "model")
.map((x: { id: string }) => x.id);
logger.debug(models);
logger.debug({
embeds: [
{
color: 0x00ff00,
description: "Available",
fields: [
{
name: "GPT-4",
value: `${models.includes("gpt-4") ? "🟢" : "🔴"}`,
inline: true,
},
{
name: "Usable models",
value: models.join(",") || "None",
inline: true,
},
],
},
],
flags: ephemeral,
});
return c.json({
type: InteractionResponseType.ChannelMessageWithSource,
data: {
Expand All @@ -166,7 +186,7 @@ app.post("/interactions", async (c) => {
},
{
name: "Usable models",
value: models.join(","),
value: models.join(",") || "None",
inline: true,
},
],
Expand Down

0 comments on commit 7aa6939

Please sign in to comment.