feat: AI对话流模式设计
parent
207f28c728
commit
97d2ccc154
|
|
@ -122,7 +122,7 @@ export const RealtimeClientProvider = ({
|
||||||
allowPersonalAccessTokenInBrowser: true,
|
allowPersonalAccessTokenInBrowser: true,
|
||||||
suppressStationaryNoise: true,
|
suppressStationaryNoise: true,
|
||||||
suppressNonStationaryNoise: true,
|
suppressNonStationaryNoise: true,
|
||||||
debug: false,
|
debug: true,
|
||||||
});
|
});
|
||||||
clientRef.current = client;
|
clientRef.current = client;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
class MessageHandler {
|
||||||
|
canHandle(_eventType: string, _dataType: string) {
|
||||||
|
throw new Error("Subclass must implement canHandle method");
|
||||||
|
}
|
||||||
|
|
||||||
|
handle(_event: string) {
|
||||||
|
throw new Error("Subclass must implement handle method");
|
||||||
|
}
|
||||||
|
|
||||||
|
setNextHandle(){}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ToolResponseHandler extends MessageHandler{
|
||||||
|
canHandle(eventType: string, dataType: string): void {
|
||||||
|
|
||||||
|
}
|
||||||
|
handle(event: string): void {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue