@fias/arche-sdk 2.19.0 → 2.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- fias-sdk-guide-version: 2.
|
|
1
|
+
<!-- fias-sdk-guide-version: 2.19.0 -->
|
|
2
2
|
|
|
3
3
|
# FIAS Plugin Development Guide
|
|
4
4
|
|
|
@@ -545,11 +545,34 @@ const { entities, isLoading } = useImageEntities({
|
|
|
545
545
|
supportsReferenceImage: true,
|
|
546
546
|
});
|
|
547
547
|
// entities[i]: { entityId, displayName, provider, modes, supportedSizes,
|
|
548
|
-
// supportsReferenceImage, isPlatformRecommended,
|
|
548
|
+
// supportsReferenceImage, isPlatformRecommended,
|
|
549
|
+
// creditsPerImage, estimatedDurationMs, company, strengths,
|
|
550
|
+
// providerParams, ... }
|
|
549
551
|
```
|
|
550
552
|
|
|
551
553
|
Each entry is scrubbed — only fields a UI legitimately needs (no provider model strings, no endpoints, no execution config).
|
|
552
554
|
|
|
555
|
+
`creditsPerImage` is what one image costs the user in credits, markup already included — it matches what the ledger deducts, so it is the figure to show. `estimatedDurationMs` sizes a progress indicator; `company` and `strengths` are model-info copy. All optional: absent means the model has nothing to declare, not that the data is missing.
|
|
556
|
+
|
|
557
|
+
**Tunable engine parameters.** `providerParams` describes what a model exposes for tuning — enough to render a settings panel without hardcoding a thing:
|
|
558
|
+
|
|
559
|
+
```tsx
|
|
560
|
+
// param: { key, label, description, controlType, defaultValue,
|
|
561
|
+
// min?, max?, step?, options?, category? }
|
|
562
|
+
// controlType: 'slider' | 'number' | 'select' | 'checkbox' | 'textarea'
|
|
563
|
+
const seed = entity.providerParams?.find((p) => p.key === 'seed');
|
|
564
|
+
await generate({ entityId, prompt, providerParams: { seed: 42 } });
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
**The `category` trap.** A param carrying `category: 'quality'` or `'style'` does NOT belong in `providerParams` — send it on the matching top-level field. Providers read those two from the top level only, and an unrecognized `providerParams` key is dropped without an error, so the image generates at the model's default **and you are billed for it anyway**:
|
|
568
|
+
|
|
569
|
+
```tsx
|
|
570
|
+
generate({ entityId, prompt, quality: 'high' }); // honoured
|
|
571
|
+
generate({ entityId, prompt, providerParams: { gpt_quality: 'high' } }); // SILENTLY IGNORED
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
Its `options` are still how you build the control — only the destination differs.
|
|
575
|
+
|
|
553
576
|
### Image-editing capability hooks (auto-generated)
|
|
554
577
|
|
|
555
578
|
**Permission:** `entities:image_edit`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- fias-sdk-guide-version: 2.
|
|
1
|
+
<!-- fias-sdk-guide-version: 2.19.0 -->
|
|
2
2
|
|
|
3
3
|
# FIAS Plugin Development Guide
|
|
4
4
|
|
|
@@ -545,11 +545,34 @@ const { entities, isLoading } = useImageEntities({
|
|
|
545
545
|
supportsReferenceImage: true,
|
|
546
546
|
});
|
|
547
547
|
// entities[i]: { entityId, displayName, provider, modes, supportedSizes,
|
|
548
|
-
// supportsReferenceImage, isPlatformRecommended,
|
|
548
|
+
// supportsReferenceImage, isPlatformRecommended,
|
|
549
|
+
// creditsPerImage, estimatedDurationMs, company, strengths,
|
|
550
|
+
// providerParams, ... }
|
|
549
551
|
```
|
|
550
552
|
|
|
551
553
|
Each entry is scrubbed — only fields a UI legitimately needs (no provider model strings, no endpoints, no execution config).
|
|
552
554
|
|
|
555
|
+
`creditsPerImage` is what one image costs the user in credits, markup already included — it matches what the ledger deducts, so it is the figure to show. `estimatedDurationMs` sizes a progress indicator; `company` and `strengths` are model-info copy. All optional: absent means the model has nothing to declare, not that the data is missing.
|
|
556
|
+
|
|
557
|
+
**Tunable engine parameters.** `providerParams` describes what a model exposes for tuning — enough to render a settings panel without hardcoding a thing:
|
|
558
|
+
|
|
559
|
+
```tsx
|
|
560
|
+
// param: { key, label, description, controlType, defaultValue,
|
|
561
|
+
// min?, max?, step?, options?, category? }
|
|
562
|
+
// controlType: 'slider' | 'number' | 'select' | 'checkbox' | 'textarea'
|
|
563
|
+
const seed = entity.providerParams?.find((p) => p.key === 'seed');
|
|
564
|
+
await generate({ entityId, prompt, providerParams: { seed: 42 } });
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
**The `category` trap.** A param carrying `category: 'quality'` or `'style'` does NOT belong in `providerParams` — send it on the matching top-level field. Providers read those two from the top level only, and an unrecognized `providerParams` key is dropped without an error, so the image generates at the model's default **and you are billed for it anyway**:
|
|
568
|
+
|
|
569
|
+
```tsx
|
|
570
|
+
generate({ entityId, prompt, quality: 'high' }); // honoured
|
|
571
|
+
generate({ entityId, prompt, providerParams: { gpt_quality: 'high' } }); // SILENTLY IGNORED
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
Its `options` are still how you build the control — only the destination differs.
|
|
575
|
+
|
|
553
576
|
### Image-editing capability hooks (auto-generated)
|
|
554
577
|
|
|
555
578
|
**Permission:** `entities:image_edit`
|