Spaces:
Runtime error
Runtime error
Thomas G. Lopes
commited on
Commit
·
3cd4fb7
1
Parent(s):
3b86586
fix lint
Browse files
src/lib/components/inference-playground/code-snippets.svelte
CHANGED
|
@@ -57,7 +57,6 @@
|
|
| 57 |
billTo: billing.organization || undefined,
|
| 58 |
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
| 59 |
} as any;
|
| 60 |
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
| 61 |
if (data.structuredOutput && conversation.isStructuredOutputAllowed) {
|
| 62 |
opts.structured_output = data.structuredOutput;
|
| 63 |
}
|
|
|
|
| 57 |
billTo: billing.organization || undefined,
|
| 58 |
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
| 59 |
} as any;
|
|
|
|
| 60 |
if (data.structuredOutput && conversation.isStructuredOutputAllowed) {
|
| 61 |
opts.structured_output = data.structuredOutput;
|
| 62 |
}
|
src/lib/state/models.svelte.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import { page } from "$app/state";
|
| 2 |
-
import {
|
| 3 |
import { edit, randomPick } from "$lib/utils/array.js";
|
| 4 |
import { safeParse } from "$lib/utils/json.js";
|
| 5 |
import typia from "typia";
|
|
|
|
| 1 |
import { page } from "$app/state";
|
| 2 |
+
import { type CustomModel, type Model } from "$lib/types.js";
|
| 3 |
import { edit, randomPick } from "$lib/utils/array.js";
|
| 4 |
import { safeParse } from "$lib/utils/json.js";
|
| 5 |
import typia from "typia";
|
src/lib/utils/business.svelte.ts
CHANGED
|
@@ -88,7 +88,6 @@ export function maxAllowedTokens(conversation: ConversationClass) {
|
|
| 88 |
function getResponseFormatObj(conversation: ConversationClass | Conversation) {
|
| 89 |
const data = conversation instanceof ConversationClass ? conversation.data : conversation;
|
| 90 |
const json = safeParse(data.structuredOutput?.schema ?? "");
|
| 91 |
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
| 92 |
if (json && data.structuredOutput?.enabled && models.supportsStructuredOutput(conversation.model, data.provider)) {
|
| 93 |
switch (data.provider) {
|
| 94 |
case "cohere": {
|
|
|
|
| 88 |
function getResponseFormatObj(conversation: ConversationClass | Conversation) {
|
| 89 |
const data = conversation instanceof ConversationClass ? conversation.data : conversation;
|
| 90 |
const json = safeParse(data.structuredOutput?.schema ?? "");
|
|
|
|
| 91 |
if (json && data.structuredOutput?.enabled && models.supportsStructuredOutput(conversation.model, data.provider)) {
|
| 92 |
switch (data.provider) {
|
| 93 |
case "cohere": {
|