@pylonsync/functions 0.9.1 → 0.10.0
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/dist/types.d.ts +13 -2
- package/package.json +1 -1
- package/src/types.ts +13 -2
package/dist/types.d.ts
CHANGED
|
@@ -435,6 +435,12 @@ export interface Llm {
|
|
|
435
435
|
* `PROVIDER_HTTP_<code>`, `PROVIDER_UNREACHABLE`,
|
|
436
436
|
* `INVALID_REQUEST`.
|
|
437
437
|
*/
|
|
438
|
+
/**
|
|
439
|
+
* Embeds text. The model is required unless
|
|
440
|
+
* `PYLON_EMBEDDINGS_MODEL` is set; there is no built-in default,
|
|
441
|
+
* because the embedding model fixes the vector space and swapping
|
|
442
|
+
* it silently would leave a stored index unqueryable.
|
|
443
|
+
*/
|
|
438
444
|
embed(input: string[], opts?: {
|
|
439
445
|
model?: string;
|
|
440
446
|
}): Promise<number[][]>;
|
|
@@ -544,8 +550,13 @@ export interface LlmTool {
|
|
|
544
550
|
input_schema: Record<string, unknown>;
|
|
545
551
|
}
|
|
546
552
|
export interface LlmCompleteRequest {
|
|
547
|
-
/**
|
|
548
|
-
*
|
|
553
|
+
/**
|
|
554
|
+
* The model to run. Required unless the app declares one in the
|
|
555
|
+
* manifest with `llm({ defaultModel })`. There is no built-in
|
|
556
|
+
* fallback: a hardcoded model name goes stale as soon as the
|
|
557
|
+
* provider ships a new generation. Subject to
|
|
558
|
+
* `PYLON_AI_MODELS_ALLOWED` gating for non-admin callers.
|
|
559
|
+
*/
|
|
549
560
|
model?: string;
|
|
550
561
|
messages: LlmMessage[];
|
|
551
562
|
system?: string;
|
package/package.json
CHANGED
package/src/types.ts
CHANGED
|
@@ -522,6 +522,12 @@ export interface Llm {
|
|
|
522
522
|
* `PROVIDER_HTTP_<code>`, `PROVIDER_UNREACHABLE`,
|
|
523
523
|
* `INVALID_REQUEST`.
|
|
524
524
|
*/
|
|
525
|
+
/**
|
|
526
|
+
* Embeds text. The model is required unless
|
|
527
|
+
* `PYLON_EMBEDDINGS_MODEL` is set; there is no built-in default,
|
|
528
|
+
* because the embedding model fixes the vector space and swapping
|
|
529
|
+
* it silently would leave a stored index unqueryable.
|
|
530
|
+
*/
|
|
525
531
|
embed(input: string[], opts?: { model?: string }): Promise<number[][]>;
|
|
526
532
|
}
|
|
527
533
|
|
|
@@ -629,8 +635,13 @@ export interface LlmTool {
|
|
|
629
635
|
}
|
|
630
636
|
|
|
631
637
|
export interface LlmCompleteRequest {
|
|
632
|
-
/**
|
|
633
|
-
*
|
|
638
|
+
/**
|
|
639
|
+
* The model to run. Required unless the app declares one in the
|
|
640
|
+
* manifest with `llm({ defaultModel })`. There is no built-in
|
|
641
|
+
* fallback: a hardcoded model name goes stale as soon as the
|
|
642
|
+
* provider ships a new generation. Subject to
|
|
643
|
+
* `PYLON_AI_MODELS_ALLOWED` gating for non-admin callers.
|
|
644
|
+
*/
|
|
634
645
|
model?: string;
|
|
635
646
|
messages: LlmMessage[];
|
|
636
647
|
system?: string;
|