@pushwoosh/rpc-gateway-ai-assistant 0.1.454 → 0.1.455
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/data.js +88 -0
- package/package.json +1 -1
- package/pushwoosh_aibuilder_v1.d.ts +3 -0
- package/pushwoosh_aigen_v1.d.ts +47 -0
package/data.js
CHANGED
|
@@ -1809,6 +1809,13 @@ export const data = {
|
|
|
1809
1809
|
},
|
|
1810
1810
|
"url": {
|
|
1811
1811
|
"type": "string"
|
|
1812
|
+
},
|
|
1813
|
+
"annotation": {
|
|
1814
|
+
"type": "string"
|
|
1815
|
+
},
|
|
1816
|
+
"annotationTranslations": {
|
|
1817
|
+
"type": "string",
|
|
1818
|
+
"mapKeyType": "string"
|
|
1812
1819
|
}
|
|
1813
1820
|
}
|
|
1814
1821
|
},
|
|
@@ -2459,6 +2466,12 @@ export const data = {
|
|
|
2459
2466
|
"response": "pushwoosh.aigen.v1.AiGenImageAltResponse",
|
|
2460
2467
|
"method": "post",
|
|
2461
2468
|
"path": "/api/v1/aigen/image-alt"
|
|
2469
|
+
},
|
|
2470
|
+
"GenerateArticleAnnotations": {
|
|
2471
|
+
"request": "pushwoosh.aigen.v1.AiGenArticleAnnotationsRequest",
|
|
2472
|
+
"response": "pushwoosh.aigen.v1.AiGenArticleAnnotationsResponse",
|
|
2473
|
+
"method": "post",
|
|
2474
|
+
"path": "/api/v1/aigen/article-annotations"
|
|
2462
2475
|
}
|
|
2463
2476
|
}
|
|
2464
2477
|
},
|
|
@@ -3514,6 +3527,81 @@ export const data = {
|
|
|
3514
3527
|
}
|
|
3515
3528
|
}
|
|
3516
3529
|
},
|
|
3530
|
+
"pushwoosh.aigen.v1.AiGenAnnotationTone": {
|
|
3531
|
+
"type": "E",
|
|
3532
|
+
"values": [
|
|
3533
|
+
"AI_GEN_ANNOTATION_TONE_UNSPECIFIED",
|
|
3534
|
+
"AI_GEN_ANNOTATION_TONE_NEUTRAL",
|
|
3535
|
+
"AI_GEN_ANNOTATION_TONE_EXPLANATORY",
|
|
3536
|
+
"AI_GEN_ANNOTATION_TONE_WITTY"
|
|
3537
|
+
]
|
|
3538
|
+
},
|
|
3539
|
+
"pushwoosh.aigen.v1.AiGenArticle": {
|
|
3540
|
+
"type": "I",
|
|
3541
|
+
"fields": {
|
|
3542
|
+
"url": {
|
|
3543
|
+
"type": "string"
|
|
3544
|
+
},
|
|
3545
|
+
"title": {
|
|
3546
|
+
"type": "string"
|
|
3547
|
+
},
|
|
3548
|
+
"summary": {
|
|
3549
|
+
"type": "string"
|
|
3550
|
+
}
|
|
3551
|
+
}
|
|
3552
|
+
},
|
|
3553
|
+
"pushwoosh.aigen.v1.AiGenArticleAnnotationsRequest": {
|
|
3554
|
+
"type": "I",
|
|
3555
|
+
"fields": {
|
|
3556
|
+
"application": {
|
|
3557
|
+
"type": "string"
|
|
3558
|
+
},
|
|
3559
|
+
"articles": {
|
|
3560
|
+
"type": "pushwoosh.aigen.v1.AiGenArticle",
|
|
3561
|
+
"array": true
|
|
3562
|
+
},
|
|
3563
|
+
"tone": {
|
|
3564
|
+
"type": "pushwoosh.aigen.v1.AiGenAnnotationTone"
|
|
3565
|
+
},
|
|
3566
|
+
"instruction": {
|
|
3567
|
+
"type": "string"
|
|
3568
|
+
},
|
|
3569
|
+
"language": {
|
|
3570
|
+
"type": "string"
|
|
3571
|
+
},
|
|
3572
|
+
"llmProvider": {
|
|
3573
|
+
"type": "string",
|
|
3574
|
+
"optional": true
|
|
3575
|
+
},
|
|
3576
|
+
"llmModel": {
|
|
3577
|
+
"type": "string",
|
|
3578
|
+
"optional": true
|
|
3579
|
+
}
|
|
3580
|
+
}
|
|
3581
|
+
},
|
|
3582
|
+
"pushwoosh.aigen.v1.AiGenArticleAnnotation": {
|
|
3583
|
+
"type": "I",
|
|
3584
|
+
"fields": {
|
|
3585
|
+
"annotation": {
|
|
3586
|
+
"type": "string"
|
|
3587
|
+
},
|
|
3588
|
+
"error": {
|
|
3589
|
+
"type": "string"
|
|
3590
|
+
},
|
|
3591
|
+
"fromSummary": {
|
|
3592
|
+
"type": "boolean"
|
|
3593
|
+
}
|
|
3594
|
+
}
|
|
3595
|
+
},
|
|
3596
|
+
"pushwoosh.aigen.v1.AiGenArticleAnnotationsResponse": {
|
|
3597
|
+
"type": "I",
|
|
3598
|
+
"fields": {
|
|
3599
|
+
"annotations": {
|
|
3600
|
+
"type": "pushwoosh.aigen.v1.AiGenArticleAnnotation",
|
|
3601
|
+
"array": true
|
|
3602
|
+
}
|
|
3603
|
+
}
|
|
3604
|
+
},
|
|
3517
3605
|
"pushwoosh.accounts.assistant.v1.Role": {
|
|
3518
3606
|
"type": "E",
|
|
3519
3607
|
"values": [
|
package/package.json
CHANGED
|
@@ -1252,6 +1252,9 @@ export type NewsItem = {
|
|
|
1252
1252
|
author: string;
|
|
1253
1253
|
category: string;
|
|
1254
1254
|
url: string;
|
|
1255
|
+
/** Editorial intro under the title, AI-written in the builder and editable. */
|
|
1256
|
+
annotation: string;
|
|
1257
|
+
annotationTranslations: Record<string, string>;
|
|
1255
1258
|
};
|
|
1256
1259
|
export type NewsSource =
|
|
1257
1260
|
/** Renders as MANUAL. */
|
package/pushwoosh_aigen_v1.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export type AiGenService_SearchStockPhotos = RpcMethod<AiGenStockSearchRequest,
|
|
|
19
19
|
export type AiGenService_ImportStockPhoto = RpcMethod<AiGenStockImportRequest, AiGenStockImportResponse>;
|
|
20
20
|
export type AiGenService_ImportImageByUrl = RpcMethod<AiGenImageImportRequest, AiGenImageImportResponse>;
|
|
21
21
|
export type AiGenService_GenerateImageAlt = RpcMethod<AiGenImageAltRequest, AiGenImageAltResponse>;
|
|
22
|
+
export type AiGenService_GenerateArticleAnnotations = RpcMethod<AiGenArticleAnnotationsRequest, AiGenArticleAnnotationsResponse>;
|
|
22
23
|
/**
|
|
23
24
|
* AiGenService unifies document create / edit / per-block regeneration and
|
|
24
25
|
* targeted block insertion into a single streaming RPC. Dispatch rules:
|
|
@@ -184,6 +185,11 @@ export interface AiGenService {
|
|
|
184
185
|
* vision-capable model and returns one concise accessibility-grade alt.
|
|
185
186
|
*/
|
|
186
187
|
GenerateImageAlt: AiGenService_GenerateImageAlt;
|
|
188
|
+
/**
|
|
189
|
+
* GenerateArticleAnnotations writes a short editorial intro per news article:
|
|
190
|
+
* the server reads each article page and falls back to the given summary.
|
|
191
|
+
*/
|
|
192
|
+
GenerateArticleAnnotations: AiGenService_GenerateArticleAnnotations;
|
|
187
193
|
}
|
|
188
194
|
export type AiGenBlockTypeHint = 'AI_GEN_BLOCK_TYPE_HINT_UNSPECIFIED' | 'AI_GEN_BLOCK_TYPE_HINT_CARD' | 'AI_GEN_BLOCK_TYPE_HINT_COLUMNS'
|
|
189
195
|
/** Top-level free-form Content block. Allowed in WEB_POPUP only. */
|
|
@@ -1092,3 +1098,44 @@ export type AiGenImageAltRequest = {
|
|
|
1092
1098
|
export type AiGenImageAltResponse = {
|
|
1093
1099
|
alt: string;
|
|
1094
1100
|
};
|
|
1101
|
+
export type AiGenAnnotationTone = 'AI_GEN_ANNOTATION_TONE_UNSPECIFIED'
|
|
1102
|
+
/** What happened, plainly. */
|
|
1103
|
+
| 'AI_GEN_ANNOTATION_TONE_NEUTRAL'
|
|
1104
|
+
/** Why the story matters to the reader. */
|
|
1105
|
+
| 'AI_GEN_ANNOTATION_TONE_EXPLANATORY'
|
|
1106
|
+
/** Light, with a gentle joke; the model falls back to neutral on sensitive topics. */
|
|
1107
|
+
| 'AI_GEN_ANNOTATION_TONE_WITTY';
|
|
1108
|
+
export type AiGenArticle = {
|
|
1109
|
+
/** Public article page; its text is what the intro is written from. */
|
|
1110
|
+
url: string;
|
|
1111
|
+
title: string;
|
|
1112
|
+
/** Feed summary, used when the page yields no readable text. */
|
|
1113
|
+
summary: string;
|
|
1114
|
+
};
|
|
1115
|
+
export type AiGenArticleAnnotationsRequest = {
|
|
1116
|
+
/** Application code, for account/app scoping middleware and logging. */
|
|
1117
|
+
application: string;
|
|
1118
|
+
/** Capped at 12, the news block's card limit. */
|
|
1119
|
+
articles: AiGenArticle[];
|
|
1120
|
+
/** UNSPECIFIED = NEUTRAL. */
|
|
1121
|
+
tone: AiGenAnnotationTone;
|
|
1122
|
+
/** Optional editorial voice guidance, up to 500 characters. */
|
|
1123
|
+
instruction: string;
|
|
1124
|
+
/** ISO code of the output language; empty = the article's own language. */
|
|
1125
|
+
language: string;
|
|
1126
|
+
/** Dev-only LLM override, same semantics as AiGenRequest.llm_provider: empty = the default. */
|
|
1127
|
+
llmProvider?: string;
|
|
1128
|
+
llmModel?: string;
|
|
1129
|
+
};
|
|
1130
|
+
export type AiGenArticleAnnotation = {
|
|
1131
|
+
/** Empty when error is set. */
|
|
1132
|
+
annotation: string;
|
|
1133
|
+
/** Per-article failure, so one broken page cannot blank the whole block. */
|
|
1134
|
+
error: string;
|
|
1135
|
+
/** True when the article page had no readable text and the feed summary was used. */
|
|
1136
|
+
fromSummary: boolean;
|
|
1137
|
+
};
|
|
1138
|
+
export type AiGenArticleAnnotationsResponse = {
|
|
1139
|
+
/** Index-aligned with AiGenArticleAnnotationsRequest.articles. */
|
|
1140
|
+
annotations: AiGenArticleAnnotation[];
|
|
1141
|
+
};
|