From 85fb0e7b0c6c84d443924dae764621319541bfb2 Mon Sep 17 00:00:00 2001 From: moeakwak Date: Tue, 14 May 2024 09:23:34 +0800 Subject: [PATCH] support gpt-4o --- .../admin/instances/instance-info-card-admin.tsx | 2 -- src/resources/poekmon-bots.json | 11 +++++++++++ src/schema/external/openai.schema.ts | 2 ++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/app/(panel)/admin/instances/instance-info-card-admin.tsx b/src/app/(panel)/admin/instances/instance-info-card-admin.tsx index 39d92fa..fbd408d 100644 --- a/src/app/(panel)/admin/instances/instance-info-card-admin.tsx +++ b/src/app/(panel)/admin/instances/instance-info-card-admin.tsx @@ -3,12 +3,10 @@ import * as React from "react"; import { Button, buttonVariants } from "@/components/ui/button"; -import { Label } from "@/components/ui/label"; import { Icons } from "@/components/icons"; import Link from "next/link"; import { FunctionButton } from "@/components/loading-button"; import { api } from "@/trpc/react"; -import { copyToClipBoard } from "@/lib/clipboard"; import { InstanceInfoCard } from "../../_components/instance-info-card"; import { toast } from "sonner"; import { TRPCClientError } from "@trpc/client"; diff --git a/src/resources/poekmon-bots.json b/src/resources/poekmon-bots.json index 76d7143..88db181 100644 --- a/src/resources/poekmon-bots.json +++ b/src/resources/poekmon-bots.json @@ -51,6 +51,17 @@ "url": "https://qph.cf2.poecdn.net/main-thumb-pb-1012-200-afogukcxakrtskfdaitupfvchongovtr.jpeg" } }, + { + "id": "Qm90OjMwMTU=", + "botId": 3015, + "handle": "GPT-4o", + "displayName": "GPT-4o", + "description": "OpenAI最强大的模型。在数量问题(数学和物理)、创意写作以及许多其他挑战性任务中比ChatGPT更强。由GPT-4o提供支持。", + "picture": { + "__typename": "URLBotImage", + "url": "https://qph.cf2.poecdn.net/main-thumb-pb-3015-200-ivodfqemfvztmvgafhdouijhknthkvmp.jpeg" + } + }, { "id": "Qm90OjMwMDc=", "botId": 3007, diff --git a/src/schema/external/openai.schema.ts b/src/schema/external/openai.schema.ts index f643d05..a6ba4d0 100644 --- a/src/schema/external/openai.schema.ts +++ b/src/schema/external/openai.schema.ts @@ -17,6 +17,8 @@ export const OpenAIChatCompletionRequestSchema = z.object({ model: z.string(), messages: z.array(OpenAIRequestMessageSchema), stream: z.boolean().nullish(), + logit_bias: z.record(z.number()).nullish(), + temperature: z.number().nullish(), }); export type OpenAIChatCompletionRequest = z.infer;