@narrative.io/data-collaboration-sdk-ts 0.0.88 → 0.0.89

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.
@@ -887,7 +887,9 @@ interface ConverationHistoryObj {
887
887
  reference_type?: string;
888
888
  }
889
889
  type ConversationHistoryType = 'history';
890
- type ConversationHistoryData = ConverationHistoryObj[];
890
+ interface ConversationHistoryData {
891
+ history: ConverationHistoryObj[];
892
+ }
891
893
  type ConversationUpdatedType = 'conversationUpdated';
892
894
  type ConversationDeletedType = 'conversationDeleted';
893
895
  interface ConversationUpdatedData {
@@ -941,7 +943,7 @@ interface ThoughtMessage {
941
943
  data: ThoughtData;
942
944
  }
943
945
  type ResponseType = 'response';
944
- interface ReponseData {
946
+ interface ResponseData {
945
947
  response: string;
946
948
  reference_type?: string;
947
949
  reference?: string;
@@ -949,7 +951,7 @@ interface ReponseData {
949
951
  }
950
952
  interface RespomseMessage {
951
953
  type: ResponseType;
952
- data: ReponseData;
954
+ data: ResponseData;
953
955
  }
954
956
  type RosettaResponseMessage = InfoMessage | HistoryMessage | ConversationUpdatedMessage | PongMessage | ErrorMessage | ThoughtMessage | RespomseMessage | ConversationListMessage;
955
957
  declare function isType<T>(input: unknown, schema: z.ZodType<T>): input is T;
@@ -25,7 +25,7 @@ const ChatCompletionRequestUserMessageSchema = z.object({
25
25
  content: z.string().min(1),
26
26
  name: ChatCompletionRequestMessageName.optional(),
27
27
  timestamp: ChatCompletionRequestMessageTimestamp.optional(),
28
- id: z.string().uuid().optional()
28
+ id: z.string().optional()
29
29
  });
30
30
  const isConversationUserMessage = (input) => {
31
31
  return ChatCompletionRequestUserMessageSchema.safeParse(input).success;
@@ -48,7 +48,7 @@ const ChatCompletionRequestAssistantMessageWithFunctionCall = z.object({
48
48
  content: z.null().or(z.string()),
49
49
  function_call: ChatCompletionRequestMessageFunctionCall,
50
50
  timestamp: ChatCompletionRequestMessageTimestamp.optional(),
51
- id: z.string().uuid().optional()
51
+ id: z.string().optional()
52
52
  }).strict();
53
53
  const isConversationAssistantMessageWithFunctionCall = (input) => {
54
54
  return ChatCompletionRequestAssistantMessageWithFunctionCall.safeParse(input).success;
@@ -57,7 +57,7 @@ const ChatCompletionRequestAssistantMessageWihtoutFunctionCall = z.object({
57
57
  role: z.enum(['assistant']),
58
58
  content: z.string(),
59
59
  timestamp: ChatCompletionRequestMessageTimestamp.optional(),
60
- id: z.string().uuid().optional()
60
+ id: z.string().optional()
61
61
  }).strict();
62
62
  const isConversationAssistantMessageWithoutFunctionCall = (input) => {
63
63
  return ChatCompletionRequestAssistantMessageWihtoutFunctionCall.safeParse(input).success;
@@ -84,7 +84,7 @@ const ChatCompletionFunctionMessageSchema = z.object({
84
84
  content: z.string(),
85
85
  name: z.string(),
86
86
  timestamp: ChatCompletionRequestMessageTimestamp.optional(),
87
- id: z.string().uuid().optional()
87
+ id: z.string().optional()
88
88
  });
89
89
  const isConversationFunctionMessage = (input) => {
90
90
  return ChatCompletionFunctionMessageSchema.safeParse(input).success;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@narrative.io/data-collaboration-sdk-ts",
3
- "version": "0.0.88",
3
+ "version": "0.0.89",
4
4
  "main": "build/index.js",
5
5
  "repository": "github:narrative-io/data-collaboration-sdk-ts",
6
6
  "source": "src/index.ts",