mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-18 03:34:20 +00:00
perf:del dify stream in ai.yaml config.and enbale stream in lark.yaml.
fix:localagent remove_think bug
This commit is contained in:
@@ -407,7 +407,7 @@ class LarkAdapter(adapter.MessagePlatformAdapter):
|
||||
|
||||
async def is_stream_output_supported() -> bool:
|
||||
is_stream = False
|
||||
if self.config.get("enable-card-reply",None):
|
||||
if self.config.get("enable-stream-reply",None):
|
||||
is_stream = True
|
||||
self.is_stream = is_stream
|
||||
|
||||
@@ -603,8 +603,8 @@ class LarkAdapter(adapter.MessagePlatformAdapter):
|
||||
"""
|
||||
lark_message = await self.message_converter.yiri2target(message, self.api_client)
|
||||
|
||||
if not is_final:
|
||||
self.seq += 1
|
||||
|
||||
self.seq += 1
|
||||
|
||||
|
||||
|
||||
@@ -620,7 +620,7 @@ class LarkAdapter(adapter.MessagePlatformAdapter):
|
||||
'type': 'card_json',
|
||||
'data': {'card_id': self.card_id_dict[message_id], 'elements': {'content': text_message}},
|
||||
}
|
||||
print(self.seq)
|
||||
|
||||
request: ContentCardElementRequest = ContentCardElementRequest.builder() \
|
||||
.card_id(self.card_id_dict[message_id]) \
|
||||
.element_id("markdown_1") \
|
||||
|
||||
@@ -65,23 +65,16 @@ spec:
|
||||
type: string
|
||||
required: true
|
||||
default: ""
|
||||
- name: enable-card-reply
|
||||
- name: enable-stream-reply
|
||||
label:
|
||||
en_US: Enable Card Reply Mode
|
||||
zh_Hans: 启用飞书卡片回复模式
|
||||
en_US: Enable Stream Reply Mode
|
||||
zh_Hans: 启用飞书流式回复模式
|
||||
description:
|
||||
en_US: If enabled, the bot will use the card of lark reply mode
|
||||
zh_Hans: 如果启用,将使用飞书卡片方式来回复内容
|
||||
en_US: If enabled, the bot will use the stream of lark reply mode
|
||||
zh_Hans: 如果启用,将使用飞书流式方式来回复内容
|
||||
type: boolean
|
||||
required: true
|
||||
default: false
|
||||
- name: card_template_id
|
||||
label:
|
||||
en_US: card template id
|
||||
zh_Hans: 卡片模板ID
|
||||
type: string
|
||||
required: true
|
||||
default: "填写你的卡片template_id"
|
||||
execution:
|
||||
python:
|
||||
path: ./lark.py
|
||||
|
||||
Reference in New Issue
Block a user