feat(tool): tool schema semplification
This commit is contained in:
1 parent
4eeb69688e
commit
cd7717bc15
23 files changed
+654
-136
No files matched your search
@@ -36,6 +36,7 @@ interface AddForm {
|
||||
maxTokensField: string
|
||||
requestTimeout: string
|
||||
thinkingLevel: string
|
||||
toolSchemaTransform: string
|
||||
extraBody: string
|
||||
customHeaders: string
|
||||
}
|
||||
@@ -54,6 +55,7 @@ const EMPTY_ADD_FORM: AddForm = {
|
||||
maxTokensField: "",
|
||||
requestTimeout: "",
|
||||
thinkingLevel: "",
|
||||
toolSchemaTransform: "",
|
||||
extraBody: "",
|
||||
customHeaders: "",
|
||||
}
|
||||
@@ -139,6 +141,7 @@ export function AddModelSheet({
|
||||
? Number(form.requestTimeout)
|
||||
: undefined,
|
||||
thinking_level: form.thinkingLevel.trim() || undefined,
|
||||
tool_schema_transform: form.toolSchemaTransform.trim() || undefined,
|
||||
extra_body: form.extraBody.trim()
|
||||
? JSON.parse(form.extraBody.trim())
|
||||
: undefined,
|
||||
@@ -333,6 +336,17 @@ export function AddModelSheet({
|
||||
/>
|
||||
</Field>
|
||||
|
||||
<Field
|
||||
label={t("models.field.toolSchemaTransform")}
|
||||
hint={t("models.field.toolSchemaTransformHint")}
|
||||
>
|
||||
<Input
|
||||
value={form.toolSchemaTransform}
|
||||
onChange={setField("toolSchemaTransform")}
|
||||
placeholder="google"
|
||||
/>
|
||||
</Field>
|
||||
|
||||
<Field
|
||||
label={t("models.field.extraBody")}
|
||||
hint={t("models.field.extraBodyHint")}
|
||||
|
||||
@@ -35,6 +35,7 @@ interface EditForm {
|
||||
maxTokensField: string
|
||||
requestTimeout: string
|
||||
thinkingLevel: string
|
||||
toolSchemaTransform: string
|
||||
extraBody: string
|
||||
customHeaders: string
|
||||
}
|
||||
@@ -66,6 +67,7 @@ export function EditModelSheet({
|
||||
maxTokensField: "",
|
||||
requestTimeout: "",
|
||||
thinkingLevel: "",
|
||||
toolSchemaTransform: "",
|
||||
extraBody: "",
|
||||
customHeaders: "",
|
||||
})
|
||||
@@ -90,6 +92,7 @@ export function EditModelSheet({
|
||||
? String(model.request_timeout)
|
||||
: "",
|
||||
thinkingLevel: model.thinking_level ?? "",
|
||||
toolSchemaTransform: model.tool_schema_transform ?? "",
|
||||
extraBody: model.extra_body
|
||||
? JSON.stringify(model.extra_body, null, 2)
|
||||
: "",
|
||||
@@ -132,6 +135,7 @@ export function EditModelSheet({
|
||||
? Number(form.requestTimeout)
|
||||
: undefined,
|
||||
thinking_level: form.thinkingLevel || undefined,
|
||||
tool_schema_transform: form.toolSchemaTransform.trim() || undefined,
|
||||
extra_body: form.extraBody.trim()
|
||||
? JSON.parse(form.extraBody.trim())
|
||||
: {},
|
||||
@@ -325,6 +329,17 @@ export function EditModelSheet({
|
||||
/>
|
||||
</Field>
|
||||
|
||||
<Field
|
||||
label={t("models.field.toolSchemaTransform")}
|
||||
hint={t("models.field.toolSchemaTransformHint")}
|
||||
>
|
||||
<Input
|
||||
value={form.toolSchemaTransform}
|
||||
onChange={setField("toolSchemaTransform")}
|
||||
placeholder="google"
|
||||
/>
|
||||
</Field>
|
||||
|
||||
<Field
|
||||
label={t("models.field.extraBody")}
|
||||
hint={t("models.field.extraBodyHint")}
|
||||
|
||||
Reference in new issue
Block a user