@1interface/chat-core 0.2.5 → 0.3.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/index.d.ts +40 -22
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -111,12 +111,13 @@ protocol: ProtocolType;
|
|
|
111
111
|
body?: any;
|
|
112
112
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
|
|
113
113
|
transcribeAudio: MutationDefinition< {
|
|
114
|
+
conversationId: string;
|
|
114
115
|
audioFile: File;
|
|
115
116
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
116
117
|
success: boolean;
|
|
117
118
|
data: {
|
|
118
119
|
text: string;
|
|
119
|
-
|
|
120
|
+
transcription_id: string;
|
|
120
121
|
};
|
|
121
122
|
}, "chatApi", unknown>;
|
|
122
123
|
getToolServers: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
@@ -161,12 +162,13 @@ export declare const apiReducers: {
|
|
|
161
162
|
body?: any;
|
|
162
163
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
|
|
163
164
|
transcribeAudio: MutationDefinition< {
|
|
165
|
+
conversationId: string;
|
|
164
166
|
audioFile: File;
|
|
165
167
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
166
168
|
success: boolean;
|
|
167
169
|
data: {
|
|
168
170
|
text: string;
|
|
169
|
-
|
|
171
|
+
transcription_id: string;
|
|
170
172
|
};
|
|
171
173
|
}, "chatApi", unknown>;
|
|
172
174
|
getToolServers: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
@@ -313,12 +315,13 @@ protocol: ProtocolType;
|
|
|
313
315
|
body?: any;
|
|
314
316
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
|
|
315
317
|
transcribeAudio: MutationDefinition< {
|
|
318
|
+
conversationId: string;
|
|
316
319
|
audioFile: File;
|
|
317
320
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
318
321
|
success: boolean;
|
|
319
322
|
data: {
|
|
320
323
|
text: string;
|
|
321
|
-
|
|
324
|
+
transcription_id: string;
|
|
322
325
|
};
|
|
323
326
|
}, "chatApi", unknown>;
|
|
324
327
|
getToolServers: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
@@ -356,6 +359,7 @@ messageQueue: {
|
|
|
356
359
|
id: string;
|
|
357
360
|
text: string;
|
|
358
361
|
queuedAt: string;
|
|
362
|
+
transcriptionIds?: string[];
|
|
359
363
|
}[];
|
|
360
364
|
};
|
|
361
365
|
conversations: {
|
|
@@ -384,12 +388,13 @@ protocol: ProtocolType;
|
|
|
384
388
|
body?: any;
|
|
385
389
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
|
|
386
390
|
transcribeAudio: MutationDefinition< {
|
|
391
|
+
conversationId: string;
|
|
387
392
|
audioFile: File;
|
|
388
393
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
389
394
|
success: boolean;
|
|
390
395
|
data: {
|
|
391
396
|
text: string;
|
|
392
|
-
|
|
397
|
+
transcription_id: string;
|
|
393
398
|
};
|
|
394
399
|
}, "chatApi", unknown>;
|
|
395
400
|
getToolServers: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
@@ -428,6 +433,7 @@ messageQueue: {
|
|
|
428
433
|
id: string;
|
|
429
434
|
text: string;
|
|
430
435
|
queuedAt: string;
|
|
436
|
+
transcriptionIds?: string[];
|
|
431
437
|
}[];
|
|
432
438
|
};
|
|
433
439
|
conversations: {
|
|
@@ -456,12 +462,13 @@ protocol: ProtocolType;
|
|
|
456
462
|
body?: any;
|
|
457
463
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
|
|
458
464
|
transcribeAudio: MutationDefinition< {
|
|
465
|
+
conversationId: string;
|
|
459
466
|
audioFile: File;
|
|
460
467
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
461
468
|
success: boolean;
|
|
462
469
|
data: {
|
|
463
470
|
text: string;
|
|
464
|
-
|
|
471
|
+
transcription_id: string;
|
|
465
472
|
};
|
|
466
473
|
}, "chatApi", unknown>;
|
|
467
474
|
getToolServers: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
@@ -535,6 +542,7 @@ messageQueue: {
|
|
|
535
542
|
id: string;
|
|
536
543
|
text: string;
|
|
537
544
|
queuedAt: string;
|
|
545
|
+
transcriptionIds?: string[];
|
|
538
546
|
}[];
|
|
539
547
|
}>;
|
|
540
548
|
|
|
@@ -869,6 +877,7 @@ export declare interface QueuedMessage {
|
|
|
869
877
|
id: string;
|
|
870
878
|
text: string;
|
|
871
879
|
queuedAt: string;
|
|
880
|
+
transcriptionIds?: string[];
|
|
872
881
|
}
|
|
873
882
|
|
|
874
883
|
export declare function refreshTokenApi(payload: RefreshRequest): Promise<RefreshApiResult>;
|
|
@@ -960,6 +969,7 @@ messageQueue: {
|
|
|
960
969
|
id: string;
|
|
961
970
|
text: string;
|
|
962
971
|
queuedAt: string;
|
|
972
|
+
transcriptionIds?: string[];
|
|
963
973
|
}[];
|
|
964
974
|
};
|
|
965
975
|
conversations: {
|
|
@@ -988,12 +998,13 @@ protocol: ProtocolType;
|
|
|
988
998
|
body?: any;
|
|
989
999
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
|
|
990
1000
|
transcribeAudio: MutationDefinition< {
|
|
1001
|
+
conversationId: string;
|
|
991
1002
|
audioFile: File;
|
|
992
1003
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
993
1004
|
success: boolean;
|
|
994
1005
|
data: {
|
|
995
1006
|
text: string;
|
|
996
|
-
|
|
1007
|
+
transcription_id: string;
|
|
997
1008
|
};
|
|
998
1009
|
}, "chatApi", unknown>;
|
|
999
1010
|
getToolServers: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
@@ -1033,6 +1044,7 @@ messageQueue: {
|
|
|
1033
1044
|
id: string;
|
|
1034
1045
|
text: string;
|
|
1035
1046
|
queuedAt: string;
|
|
1047
|
+
transcriptionIds?: string[];
|
|
1036
1048
|
}[];
|
|
1037
1049
|
};
|
|
1038
1050
|
conversations: {
|
|
@@ -1061,12 +1073,13 @@ protocol: ProtocolType;
|
|
|
1061
1073
|
body?: any;
|
|
1062
1074
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
|
|
1063
1075
|
transcribeAudio: MutationDefinition< {
|
|
1076
|
+
conversationId: string;
|
|
1064
1077
|
audioFile: File;
|
|
1065
1078
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
1066
1079
|
success: boolean;
|
|
1067
1080
|
data: {
|
|
1068
1081
|
text: string;
|
|
1069
|
-
|
|
1082
|
+
transcription_id: string;
|
|
1070
1083
|
};
|
|
1071
1084
|
}, "chatApi", unknown>;
|
|
1072
1085
|
getToolServers: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
@@ -1120,6 +1133,7 @@ export declare interface StreamMessageParams {
|
|
|
1120
1133
|
message: string;
|
|
1121
1134
|
enableTts?: boolean;
|
|
1122
1135
|
debugMode?: boolean;
|
|
1136
|
+
transcriptionIds?: string[];
|
|
1123
1137
|
body?: Record<string, unknown>;
|
|
1124
1138
|
}
|
|
1125
1139
|
|
|
@@ -1186,7 +1200,7 @@ declare interface UseChatConnectionParams {
|
|
|
1186
1200
|
}
|
|
1187
1201
|
|
|
1188
1202
|
declare interface UseChatConnectionReturn {
|
|
1189
|
-
sendMessage: (inputMsg?: string) => Promise<void>;
|
|
1203
|
+
sendMessage: (inputMsg?: string, transcriptionIds?: string[]) => Promise<void>;
|
|
1190
1204
|
startInitialStream: (conversationId: string, location?: UserLocation | null) => Promise<void>;
|
|
1191
1205
|
setThinkingState: (thinking: boolean) => void;
|
|
1192
1206
|
abortStream: () => void;
|
|
@@ -3809,11 +3823,12 @@ authorize_url: string;
|
|
|
3809
3823
|
reset: () => void;
|
|
3810
3824
|
}];
|
|
3811
3825
|
|
|
3812
|
-
export declare const useSTTRecording: ({ onTranscriptionComplete, onTranscriptionPopulate, autoSendVoice, }?: UseSTTRecordingParams) => UseSTTRecordingReturn;
|
|
3826
|
+
export declare const useSTTRecording: ({ onTranscriptionComplete, onTranscriptionPopulate, ensureConversation, autoSendVoice, }?: UseSTTRecordingParams) => UseSTTRecordingReturn;
|
|
3813
3827
|
|
|
3814
3828
|
declare interface UseSTTRecordingParams {
|
|
3815
|
-
onTranscriptionComplete?: (text: string) => Promise<void>;
|
|
3816
|
-
onTranscriptionPopulate?: (text: string) => void;
|
|
3829
|
+
onTranscriptionComplete?: (text: string, transcriptionIds: string[]) => Promise<void>;
|
|
3830
|
+
onTranscriptionPopulate?: (text: string, transcriptionId: string) => void;
|
|
3831
|
+
ensureConversation?: () => Promise<string | null>;
|
|
3817
3832
|
autoSendVoice?: boolean;
|
|
3818
3833
|
}
|
|
3819
3834
|
|
|
@@ -3869,7 +3884,7 @@ export declare const useTranscribeAudioMutation: <R extends Record<string, any>
|
|
|
3869
3884
|
success: boolean;
|
|
3870
3885
|
data: {
|
|
3871
3886
|
text: string;
|
|
3872
|
-
|
|
3887
|
+
transcription_id: string;
|
|
3873
3888
|
};
|
|
3874
3889
|
};
|
|
3875
3890
|
error?: FetchBaseQueryError | SerializedError;
|
|
@@ -3882,7 +3897,7 @@ export declare const useTranscribeAudioMutation: <R extends Record<string, any>
|
|
|
3882
3897
|
success: boolean;
|
|
3883
3898
|
data: {
|
|
3884
3899
|
text: string;
|
|
3885
|
-
|
|
3900
|
+
transcription_id: string;
|
|
3886
3901
|
};
|
|
3887
3902
|
};
|
|
3888
3903
|
error?: FetchBaseQueryError | SerializedError;
|
|
@@ -3905,7 +3920,7 @@ export declare const useTranscribeAudioMutation: <R extends Record<string, any>
|
|
|
3905
3920
|
success: boolean;
|
|
3906
3921
|
data: {
|
|
3907
3922
|
text: string;
|
|
3908
|
-
|
|
3923
|
+
transcription_id: string;
|
|
3909
3924
|
};
|
|
3910
3925
|
};
|
|
3911
3926
|
error?: FetchBaseQueryError | SerializedError;
|
|
@@ -3928,7 +3943,7 @@ export declare const useTranscribeAudioMutation: <R extends Record<string, any>
|
|
|
3928
3943
|
success: boolean;
|
|
3929
3944
|
data: {
|
|
3930
3945
|
text: string;
|
|
3931
|
-
|
|
3946
|
+
transcription_id: string;
|
|
3932
3947
|
};
|
|
3933
3948
|
};
|
|
3934
3949
|
error?: FetchBaseQueryError | SerializedError;
|
|
@@ -3941,7 +3956,7 @@ export declare const useTranscribeAudioMutation: <R extends Record<string, any>
|
|
|
3941
3956
|
success: boolean;
|
|
3942
3957
|
data: {
|
|
3943
3958
|
text: string;
|
|
3944
|
-
|
|
3959
|
+
transcription_id: string;
|
|
3945
3960
|
};
|
|
3946
3961
|
};
|
|
3947
3962
|
error?: FetchBaseQueryError | SerializedError;
|
|
@@ -3977,7 +3992,7 @@ export declare const useTranscribeAudioMutation: <R extends Record<string, any>
|
|
|
3977
3992
|
success: boolean;
|
|
3978
3993
|
data: {
|
|
3979
3994
|
text: string;
|
|
3980
|
-
|
|
3995
|
+
transcription_id: string;
|
|
3981
3996
|
};
|
|
3982
3997
|
};
|
|
3983
3998
|
error?: FetchBaseQueryError | SerializedError;
|
|
@@ -3990,7 +4005,7 @@ export declare const useTranscribeAudioMutation: <R extends Record<string, any>
|
|
|
3990
4005
|
success: boolean;
|
|
3991
4006
|
data: {
|
|
3992
4007
|
text: string;
|
|
3993
|
-
|
|
4008
|
+
transcription_id: string;
|
|
3994
4009
|
};
|
|
3995
4010
|
};
|
|
3996
4011
|
error?: FetchBaseQueryError | SerializedError;
|
|
@@ -4013,7 +4028,7 @@ export declare const useTranscribeAudioMutation: <R extends Record<string, any>
|
|
|
4013
4028
|
success: boolean;
|
|
4014
4029
|
data: {
|
|
4015
4030
|
text: string;
|
|
4016
|
-
|
|
4031
|
+
transcription_id: string;
|
|
4017
4032
|
};
|
|
4018
4033
|
};
|
|
4019
4034
|
error?: FetchBaseQueryError | SerializedError;
|
|
@@ -4036,7 +4051,7 @@ export declare const useTranscribeAudioMutation: <R extends Record<string, any>
|
|
|
4036
4051
|
success: boolean;
|
|
4037
4052
|
data: {
|
|
4038
4053
|
text: string;
|
|
4039
|
-
|
|
4054
|
+
transcription_id: string;
|
|
4040
4055
|
};
|
|
4041
4056
|
};
|
|
4042
4057
|
error?: FetchBaseQueryError | SerializedError;
|
|
@@ -4049,7 +4064,7 @@ export declare const useTranscribeAudioMutation: <R extends Record<string, any>
|
|
|
4049
4064
|
success: boolean;
|
|
4050
4065
|
data: {
|
|
4051
4066
|
text: string;
|
|
4052
|
-
|
|
4067
|
+
transcription_id: string;
|
|
4053
4068
|
};
|
|
4054
4069
|
};
|
|
4055
4070
|
error?: FetchBaseQueryError | SerializedError;
|
|
@@ -4065,17 +4080,20 @@ export declare const useTranscribeAudioMutation: <R extends Record<string, any>
|
|
|
4065
4080
|
})) => R;
|
|
4066
4081
|
fixedCacheKey?: string;
|
|
4067
4082
|
}) => readonly [(arg: {
|
|
4083
|
+
conversationId: string;
|
|
4068
4084
|
audioFile: File;
|
|
4069
4085
|
}) => MutationActionCreatorResult<MutationDefinition< {
|
|
4086
|
+
conversationId: string;
|
|
4070
4087
|
audioFile: File;
|
|
4071
4088
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
4072
4089
|
success: boolean;
|
|
4073
4090
|
data: {
|
|
4074
4091
|
text: string;
|
|
4075
|
-
|
|
4092
|
+
transcription_id: string;
|
|
4076
4093
|
};
|
|
4077
4094
|
}, "chatApi", unknown>>, TSHelpersNoInfer<R> & {
|
|
4078
4095
|
originalArgs?: {
|
|
4096
|
+
conversationId: string;
|
|
4079
4097
|
audioFile: File;
|
|
4080
4098
|
};
|
|
4081
4099
|
reset: () => void;
|