We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1221bbb commit 6a28842Copy full SHA for 6a28842
1 file changed
packages/console/app/src/routes/zen/go/v1/responses.ts
@@ -0,0 +1,14 @@
1
+import type { APIEvent } from "@solidjs/start/server"
2
+import { handler } from "~/routes/zen/util/handler"
3
+import { parseOpenAiVariant } from "~/routes/zen/util/variant"
4
+
5
+export function POST(input: APIEvent) {
6
+ return handler(input, {
7
+ format: "openai",
8
+ modelList: "lite",
9
+ parseApiKey: (headers: Headers) => headers.get("authorization")?.split(" ")[1],
10
+ parseModel: (url: string, body: any) => body.model,
11
+ parseVariant: (url: string, body: any) => parseOpenAiVariant(body),
12
+ parseIsStream: (url: string, body: any) => !!body.stream,
13
+ })
14
+}
0 commit comments