Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- src/routes/responses.ts +0 -2
- src/schemas.ts +2 -2
src/routes/responses.ts
CHANGED
@@ -529,8 +529,6 @@ async function* handleOneTurnStream(
|
|
529 |
apiKey: apiKey,
|
530 |
defaultHeaders,
|
531 |
});
|
532 |
-
console.log("payload as JSON", JSON.stringify(payload, null, 2));
|
533 |
-
console.log("defaultHeaders", defaultHeaders);
|
534 |
const stream = await client.chat.completions.create(payload);
|
535 |
let previousInputTokens = responseObject.usage?.input_tokens ?? 0;
|
536 |
let previousOutputTokens = responseObject.usage?.output_tokens ?? 0;
|
|
|
529 |
apiKey: apiKey,
|
530 |
defaultHeaders,
|
531 |
});
|
|
|
|
|
532 |
const stream = await client.chat.completions.create(payload);
|
533 |
let previousInputTokens = responseObject.usage?.input_tokens ?? 0;
|
534 |
let previousOutputTokens = responseObject.usage?.output_tokens ?? 0;
|
src/schemas.ts
CHANGED
@@ -101,8 +101,8 @@ export const createResponseParamsSchema = z.object({
|
|
101 |
z.object({
|
102 |
type: z.literal("output_text"),
|
103 |
text: z.string(),
|
104 |
-
annotations: z.array(z.
|
105 |
-
logprobs: z.array(z.
|
106 |
}),
|
107 |
z.object({
|
108 |
type: z.literal("refusal"),
|
|
|
101 |
z.object({
|
102 |
type: z.literal("output_text"),
|
103 |
text: z.string(),
|
104 |
+
annotations: z.array(z.record(z.any())).nullable().optional(), // TODO: incomplete
|
105 |
+
logprobs: z.array(z.record(z.any())).nullable().optional(), // TODO: incomplete
|
106 |
}),
|
107 |
z.object({
|
108 |
type: z.literal("refusal"),
|