priori-chat-sdk 1.0.13 → 1.0.14

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/index.d.mts CHANGED
@@ -1,3 +1,13 @@
1
+ type ApiModerationCategory = "underage_site_use" | "sexual_minors" | "beastiality" | "sexual_violence" | "prompt_injection";
2
+ type ApiModerationInfo = {
3
+ category: ApiModerationCategory;
4
+ /**
5
+ * Explanation of why this message was flagged
6
+ */
7
+ reasoning: string;
8
+ severity: ApiModerationSeverity;
9
+ };
10
+ type ApiModerationSeverity = "Low" | "Medium" | "High" | "Critical";
1
11
  /**
2
12
  * Represents an API key info (without the actual key)
3
13
  */
@@ -186,6 +196,12 @@ type Message$1 = {
186
196
  * Unique identifier for the content
187
197
  */
188
198
  id?: string | null;
199
+ /**
200
+ * What tone was used to generate the message (useful only for debug or display in admin
201
+ * panel. Does nothing as input parameter, only output)
202
+ */
203
+ message_tone?: string | null;
204
+ moderation?: ApiModerationInfo | null;
189
205
  /**
190
206
  * Unix timestamp when the message was sent
191
207
  */
@@ -232,7 +248,7 @@ type UploadContentRequest = {
232
248
  */
233
249
  bot_id: string;
234
250
  /**
235
- * URL of the image to upload
251
+ * URL of the image to upload (can be a remote URL like https://example.com/image.jpg or a data URL like data:image/jpeg;base64,...)
236
252
  */
237
253
  image_url: string;
238
254
  };
@@ -419,6 +435,7 @@ interface Message {
419
435
  from_bot: boolean;
420
436
  attached_media?: AttachedMedia;
421
437
  sent_at?: number;
438
+ moderation?: ApiModerationInfo;
422
439
  }
423
440
  /**
424
441
  * Configuration for retrieving a conversation by its unique ID
@@ -911,4 +928,4 @@ declare class PrioriChat {
911
928
  deleteContent(options: DeleteContentData['path']): Promise<DeleteContentResponse>;
912
929
  }
913
930
 
914
- export { ApiError, type ApiKeyInfo, type AttachedMedia, type Bot, type Content, Conversation, type ConversationCallbacks, type ConversationHeader, type ConversationOptions, type Conversation$1 as ConversationType, type ConversationWithId, type ConversationWithUserBot, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateBotRequest, type CreateBotResponse, type CreateConversationOptions, type CreateConversationResponse, type DeactivateApiKeyData, type DeactivateApiKeyResponse, type DeleteContentResponse, type GetBotResponse, type GetConversationOptions, type GetConversationResponse, type GetMemoriesResponse, type ListApiKeysResponse, type ListBotsResponse, type ListContentQuery, type ListContentResponse, type ListConversationsOptions, type ListConversationsResponse, type MediaTypeFilter, type MemoryResponse, type Message, PrioriChat, type SearchedMessage, type UpdateBotRequest, type UpdateBotResponse, type UploadContentRequest, type UploadContentResponse };
931
+ export { ApiError, type ApiKeyInfo, type ApiModerationCategory, type ApiModerationInfo, type ApiModerationSeverity, type AttachedMedia, type Bot, type Content, Conversation, type ConversationCallbacks, type ConversationHeader, type ConversationOptions, type Conversation$1 as ConversationType, type ConversationWithId, type ConversationWithUserBot, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateBotRequest, type CreateBotResponse, type CreateConversationOptions, type CreateConversationResponse, type DeactivateApiKeyData, type DeactivateApiKeyResponse, type DeleteContentResponse, type GetBotResponse, type GetConversationOptions, type GetConversationResponse, type GetMemoriesResponse, type ListApiKeysResponse, type ListBotsResponse, type ListContentQuery, type ListContentResponse, type ListConversationsOptions, type ListConversationsResponse, type MediaTypeFilter, type MemoryResponse, type Message, PrioriChat, type SearchedMessage, type UpdateBotRequest, type UpdateBotResponse, type UploadContentRequest, type UploadContentResponse };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,13 @@
1
+ type ApiModerationCategory = "underage_site_use" | "sexual_minors" | "beastiality" | "sexual_violence" | "prompt_injection";
2
+ type ApiModerationInfo = {
3
+ category: ApiModerationCategory;
4
+ /**
5
+ * Explanation of why this message was flagged
6
+ */
7
+ reasoning: string;
8
+ severity: ApiModerationSeverity;
9
+ };
10
+ type ApiModerationSeverity = "Low" | "Medium" | "High" | "Critical";
1
11
  /**
2
12
  * Represents an API key info (without the actual key)
3
13
  */
@@ -186,6 +196,12 @@ type Message$1 = {
186
196
  * Unique identifier for the content
187
197
  */
188
198
  id?: string | null;
199
+ /**
200
+ * What tone was used to generate the message (useful only for debug or display in admin
201
+ * panel. Does nothing as input parameter, only output)
202
+ */
203
+ message_tone?: string | null;
204
+ moderation?: ApiModerationInfo | null;
189
205
  /**
190
206
  * Unix timestamp when the message was sent
191
207
  */
@@ -232,7 +248,7 @@ type UploadContentRequest = {
232
248
  */
233
249
  bot_id: string;
234
250
  /**
235
- * URL of the image to upload
251
+ * URL of the image to upload (can be a remote URL like https://example.com/image.jpg or a data URL like data:image/jpeg;base64,...)
236
252
  */
237
253
  image_url: string;
238
254
  };
@@ -419,6 +435,7 @@ interface Message {
419
435
  from_bot: boolean;
420
436
  attached_media?: AttachedMedia;
421
437
  sent_at?: number;
438
+ moderation?: ApiModerationInfo;
422
439
  }
423
440
  /**
424
441
  * Configuration for retrieving a conversation by its unique ID
@@ -911,4 +928,4 @@ declare class PrioriChat {
911
928
  deleteContent(options: DeleteContentData['path']): Promise<DeleteContentResponse>;
912
929
  }
913
930
 
914
- export { ApiError, type ApiKeyInfo, type AttachedMedia, type Bot, type Content, Conversation, type ConversationCallbacks, type ConversationHeader, type ConversationOptions, type Conversation$1 as ConversationType, type ConversationWithId, type ConversationWithUserBot, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateBotRequest, type CreateBotResponse, type CreateConversationOptions, type CreateConversationResponse, type DeactivateApiKeyData, type DeactivateApiKeyResponse, type DeleteContentResponse, type GetBotResponse, type GetConversationOptions, type GetConversationResponse, type GetMemoriesResponse, type ListApiKeysResponse, type ListBotsResponse, type ListContentQuery, type ListContentResponse, type ListConversationsOptions, type ListConversationsResponse, type MediaTypeFilter, type MemoryResponse, type Message, PrioriChat, type SearchedMessage, type UpdateBotRequest, type UpdateBotResponse, type UploadContentRequest, type UploadContentResponse };
931
+ export { ApiError, type ApiKeyInfo, type ApiModerationCategory, type ApiModerationInfo, type ApiModerationSeverity, type AttachedMedia, type Bot, type Content, Conversation, type ConversationCallbacks, type ConversationHeader, type ConversationOptions, type Conversation$1 as ConversationType, type ConversationWithId, type ConversationWithUserBot, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateBotRequest, type CreateBotResponse, type CreateConversationOptions, type CreateConversationResponse, type DeactivateApiKeyData, type DeactivateApiKeyResponse, type DeleteContentResponse, type GetBotResponse, type GetConversationOptions, type GetConversationResponse, type GetMemoriesResponse, type ListApiKeysResponse, type ListBotsResponse, type ListContentQuery, type ListContentResponse, type ListConversationsOptions, type ListConversationsResponse, type MediaTypeFilter, type MemoryResponse, type Message, PrioriChat, type SearchedMessage, type UpdateBotRequest, type UpdateBotResponse, type UploadContentRequest, type UploadContentResponse };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "priori-chat-sdk",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "TypeScript SDK for Priori Chat API",
5
5
  "main": "src/index.ts",
6
6
  "module": "dist/index.mjs",
package/src/index.ts CHANGED
@@ -37,6 +37,9 @@ export type {
37
37
  UploadContentRequest,
38
38
  UploadContentResponse,
39
39
  DeleteContentResponse,
40
- MediaTypeFilter
40
+ MediaTypeFilter,
41
+ ApiModerationInfo,
42
+ ApiModerationCategory,
43
+ ApiModerationSeverity
41
44
  } from "./client/types.gen";
42
45