TranscriptLoggerMiddleware 類別
將傳入和傳出活動記錄至 TranscriptStore。
建構函式
TranscriptLoggerMiddleware(logger: TranscriptLogger)
參數
| 名稱 | Description |
|---|---|
|
logger
必要
|
|
方法
| log_activity |
記錄活動。 :p aram 文字記錄:文字記錄。 :p aram 活動:要記錄的活動。 |
| on_turn |
中間件的初始化。 :p aram 內容:目前與使用者交談回合的內容。 :p aram 邏輯:在中間件鏈結結尾呼叫的函式。 |
log_activity
記錄活動。 :p aram 文字記錄:文字記錄。 :p aram 活動:要記錄的活動。
async log_activity(transcript: Queue, activity: Activity) -> None
參數
| 名稱 | Description |
|---|---|
|
transcript
必要
|
|
|
activity
必要
|
|
on_turn
中間件的初始化。 :p aram 內容:目前與使用者交談回合的內容。 :p aram 邏輯:在中間件鏈結結尾呼叫的函式。
async on_turn(context: TurnContext, logic: Callable[[TurnContext], Awaitable])
參數
| 名稱 | Description |
|---|---|
|
context
必要
|
|
|
logic
必要
|
|